Click here to Skip to main content
15,885,869 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Help me!

I am engineer student,

I want to build bidding website (Auction Website) which is similar to www.jeetle.in and www.almostfree.in (lowest unique bidding)


I have added time by jquery timer control. But I don't know how to end the product when time ends.

And also database link.. How to link databse.



NEEDS:
1. How to dynamically add/ end the product. (time based)
2. How to store these data in database simultaneously.



Explain me briefly !
Posted
Updated 17-Jun-13 0:15am
v4
Comments
Nelek 17-Jun-13 6:15am    
You say you are not able to end, but you don't explain very well what you tried. So please read: What have you tried?[^]
and use the "improve question" widget to add the necessary information. So it will be easier for the people to help you

1 solution

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:

JavaScript
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.
 
Share this answer
 
v3
Comments
Aravin.it 17-Jun-13 6:42am    
Thank you sir. Will try it.
Nick Fisher (Consultant) 17-Jun-13 6:50am    
No worries. Firebug is your friend when developing AJAX applications. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900