-
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?
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here?
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
-
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, 04: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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks