-
Ajax PHP refresh
Hi I'm developing an instant messenger (AJAX/PHP/MYSQL) and I am currently working on a iframe which states if user is on/offline (the way this works is there is a field in the database which is default 'offline' which changes to 'online' when user logs in).
The problem is that it (the iframe) currently uses Javascript and it flickers when it refreshes (att the text).
I was wondering if there is an AJAX way so that it only updates when there is a change in the database rather than a set time (or a set time with no flicker), or a method with no iframe what-so-ever.
If anybody has any advice that would be much appreciated, thank you.
-
Welcome to DevX 
 Originally Posted by jasonmc
I was wondering if there is an AJAX way so that it only updates when there is a change in the database rather than a set time
You would have to be constantly polling the database for a change in that field. How much traffic is that going to involve?
-
Thanks very much for the reply ...there will not be a huge amount of traffic. I have been looking into an alternative way of doing it using an AJAX div refresh instead of an IFrame...with no joy as yet. I was hoping to have the AJAX pointing to the div and the PHP code in there to refresh every X seconds. Maybe I should open up a new thread or is that OK in here?
Thanks again for the reply, much appreciated
Similar Threads
-
By Hotelsincarmel in forum AJAX
Replies: 0
Last Post: 08-06-2010, 07:26 AM
-
By sabinkumar in forum AJAX
Replies: 0
Last Post: 02-16-2009, 05:38 AM
-
Replies: 0
Last Post: 08-10-2007, 07:17 PM
-
Replies: 0
Last Post: 03-22-2007, 09:15 PM
-
Replies: 0
Last Post: 08-28-2006, 04:05 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|