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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

refresh when variable changes

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello all,
I may be asking a stupid question, but is there any way to refresh a page when a database is updated, or a servervariable has changed, so that every user logged on to that page will automaticly see the changes whitout refreshing maually, i mean something like what happens on a chatserver? Or can it be done with javascript or anything? Hope you know what i mean
thnx
martin
 
Hey Martin,

There really isn't any straightforward way to do this without just having the page auto-refresh every few seconds. I think your best approach is to setup a frames based page with one 2 frames being 1 pixel high or wide each and with some java script checking for updates. If an update is detected, javascript could cause the main frame to udpate. I would recommend setting up the two "hidden" frames with frame 1 making frame2 load a "check for updates" script. After frame 2 loads, frame 1 can check the contents of frame 2 to see whether a change has occured. If it has, it can then cause frame 3 (main body) to refresh.

If you really want to have a "push" based system where the browser waits for changes, you're going to need to use Java where there is true networking capabilities.

Good luck,
GJ
 
tnx Gunjack,

I think i understand what you're saying.
I actually found an 'update checking' javascript already.
Bye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top