Solved

Best way for a browser to periodically check for changes in a database table?

Posted on 2008-10-22
3
168 Views
Last Modified: 2012-05-05
I have a website where job details are entered into a database. A program from a backend server grabs these details and tries to price it... when this is done it changes the status field of the job to 'priced'. This may take 30sec so the browser needs to continuously check the database for a 'priced' value.

At the moment we have a javascript function that re-loads the page every 2 seconds, which causes the page to check the status of the field every time. If the status field becomes 'priced' within 30sec then it'll continue. Otherwise it'll say job cannot be priced.

Does anyone know a more effective way of doing this with AJAX for example... or at least point me in the right direction.

Thanks.



0
Comment
Question by:robaherne
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
crazyman earned 500 total points
ID: 22777945
Use an ajax update panel and reload it every x seconds.

http://encosia.com/2007/07/25/display-data-updates-in-real-time-with-ajax/
0
 
LVL 13

Assisted Solution

by:crazyman
crazyman earned 500 total points
ID: 22777966
0
 

Author Closing Comment

by:robaherne
ID: 31508796
Great stuff! Thanks a lot!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now