You need to use an asynchronous technology such as AJAX, which connects back to the database every few seconds to update the auction details such, as the
price and
quantity left. Then when the quantity hits zero, you grab another product from the DB and start the process all over again. This method works well particularly well when combined with XML/JSON.
Ajax Tutorial for Beginners: Part 1[
^]
Ajax Tutorial for Beginners with XML & JSON: Part 2[
^]
I used to write falling-price auction sites like the ones you posted, and this is how they work. Normally you will want to set your javascript timer to refresh your auction details by calling the same AJAX function around every 3 seconds or so:
setTimeout(function(){myAJAXFunc()},3000);
And if you're using Firefox, a nice way to track the XML being passed back is to use the
XML/HTTP Request viewer in the
Firebug plug-in, to see your AJAX data as it refreshes from the DB every few seconds, as detailed here:
http://getfirebug.com/network[
^]
Clicking on the
XHR tab in the toolbar shows all the AJAX information as it updates the current page.