Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prompting on page updates

Status
Not open for further replies.

kyern

Programmer
Mar 30, 2006
36
US
I have a unique problem I am hoping I can get some insight on. I have a intranet page that updates its content by a javascript refresh. I need to change this so the page checks for updated entries in real time if there are more entries than current update the page. Checking for updates like this looks like a job for AJAX. Does that sound correct or is there any other way to check for updates like I am describing?

David
 
I would use AJAX, and the way i would do it, would be to create a script in PHP or whatever language you use, to connect to the database or check the file or whatever and output a integer 0 for no new upload and 1 for new upload then you can then use a simple setTimeOut to check this variable every second or whatever... you'd like... And check your responseText to see if that number = 1 then do another ajax function to reload the innerHTML of your page...


Jason


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top