I have a repeating div for an auction site. I’d like to make it so when someone joins the auction it auto updates on the repeating div. I’m using ajax for all auto update divs on the site.
The site is http://www.Dreamybids.com
On the home page you see each auction in it’s own pinterest style box. You’ll see “Seats: x | Seats Taken:0”
The Open is what needs to be updated each time someone takes a seat in the auction.
Here’s my current code for the div. How do I add an ajax call to update that specific auction id every x amount of seconds.
<? if($totalRows_moline>0)
{ ?>
<?php do { ?>
<div class="box-shortcode box-gray" style="padding-left:15px; padding-right:15px; text-align:center; font-size:10px; padding-top:0px; padding-bottom:0px; margin-top:-1px; margin-bottom:-1px" id="seats">Seats: <?php echo $seats ?> | Seats Taken: <? if($seats>1){?><?php echo $spots ?><? }?><? if($seats<=1){?>N/A<? }?></div> <?php }} while ($row_moline = mysql_fetch_assoc($moline)); ?>
You need set interval for the pause:
and for updating the auction id, if your doing it client-side, then use
Both can be found here:
http://w3schools.com