   [web] Making flicker free chatrooms
  Hi i am making a chatroom in php and for the text to be showin in the output html window it has to reload itself but when this happens it flickers like mad and this is in Firefox in IE it keeps going to the top again and again. Does anyone know of a way to get it to load all messages in a nice smothe way on both Firefox, IE and Opera etc? thnx in advance.   
  you need some AJAX technology. (updating the page without reloading)   ;  How do i do that or were do i get that? this is in php by the way and i do not have access to the SQL server so write to files.   ;  It's certainly non-trivial.To produce a chatroom with ideal performance characteristics, you'll need to do server-push. This abuses the standard HTTP mechanism, but does work with most browsers and some proxy servers.It's not easy at all because server-side programming environments aren't designed to do it. I've achived this, but it was a pain in the arse.Yes of course you'll need to use client side &#106avascript to display stuff without refreshing the page - but that is the easy bit (You could consider this a use of AJAX).I should state again - this is nontrivial.Mark   ;  This is the short/painful way Ajax works.  The idea is rather quite brilliant.... but I have refused to use it yet due to how much time it takes to impliment in PHP  and inconsistancies from browser to browser.  Anyways, Ajax works based on frames.  You have a hidden frame with size = 0, and a main frame that takes up the entire site.  What Ajax then allows you to do is bypass the whole post process that your typically HTML form makes you go through, and instead passes the data to the hidden frame.  The hidden frame is where all the magic takes place.  First, it makes a connection to your database, updates or retreives whatever data you tell it to (through all your typically PHP/MySql calls) and then stores all that info client side.  That hidden frame can then, through the use of &#106avascript, pass the information back to your main frame (typically through the use of DIV tags).  Thus, you have the ability to update your database without ever having to go through a page refresh.  For a fairly cool example, you can go to www.google.com/webhp?complete=1  Do a standard web search, and be amazed as google starts retreiving possible searches as you type.  With all that being said, why are you using PHP to make a chat client?   ;  Because i thought php would be powerfull enougth to do such a thing and i havn't ever programmed in Java to make an applet for my site. Thnx for info upto but other than Ajax is there any other way?   ;  The "Ajax" techniques work well for many types of application, and the inconsistencies between browsers are small and easy to work around (Certainly compared to something like CSS).But chat is not such an application.This is because a chatroom breaks the conventional HTTP request/response model.Some people make chatrooms by polling. This is extremely inefficient (non-scalable) and makes unresponsive chatrooms.Cygnus_X: the "hidden frame" technique is not the only one, and probably not the one I'd normally recommend using for a typical ajax app. However, it is the only moderately standard[1] way to do server-push. Implementing server-push as a hidden frame really sucks- a lot of the problem is the server coding though, not the client side stuff.Mark[1] Mozilla supports server-push with XMLHttpRequest :)   ;  Save yourself a lot of trouble and headaches. Either:1) Get a standard package like phpMyChat or something similaror2) Use IRC and put a Java applet or CGI:IRC on your site for the people that don't know how to use mIRC or some other IRC client. This is what I do. Note: If you put a java applet on your site, people will need to have port 6667 (IRC port) unblocked on their firewall. CGI:IRC works over HTTP port 80.   ;  I concure with the pre-made applet.  This linkhttp://www.afternet.org/content/view/9/8is virtually the same as what gamedev.net uses.  Try it out.   ;  By anychance can you make chatrooms in flash using action scripts server functions?   