homepage Welcome to WebmasterWorld Guest from 54.211.95.201
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Refreshing webpage when MySQL db has changed
drsmith




msg:3529513
 3:24 pm on Dec 17, 2007 (gmt 0)

I am pretty sure there is not a way to directly do this but wanted to throw it out. Basically we have a log (that several users at a time could be looking at), when data is submitted it posts to the MySQL db. Instead of having the page auto-refresh every 2 minutes or so, it would be nice if it would just refresh when a change is detected. This would also cut down on the chances that data is missed due to inopportune refreshing/submitting. Read something about AJAX? Pretty much a novice so any help would be appreciated.

Thanks
DS

 

Demaestro




msg:3529519
 3:37 pm on Dec 17, 2007 (gmt 0)

Ajax is the nicest route because no page refresh is called, the data just reloads from an http header request.

Look into it.

There are fully built libraries available.

I use this one with much success. They take care of all the browser compliance and code updates.

Yahoo (YUI)
[developer.yahoo.com...]

cameraman




msg:3529617
 5:37 pm on Dec 17, 2007 (gmt 0)

You'll still have to poll the server for changes, though. About all you could do is increase your polling rate.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved