Solved

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

Posted on 2008-10-22
3
175 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

691 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