Legend123 Posted October 11, 2010 Share Posted October 11, 2010 Hi All, I am new here and looking for a little bit of help on a project I have been working on. At the moment we have data streaming in to a SQL database. Each new set of data is put in to a separate row in the table which we then require to display in a chat window. We can get the chat to show and we are polling the database every 3000 milliseconds for data to show. However when the refresh takes place the whole div id refreshes causing the chat to appear to be flashing - even when there is no new data to display. This is a simplified version of the code we are using: <html> <head> <style type="text/css"> #load_msg { background-color:#ffffcc; font-size:24px; font-family:'Georgia', Times New Roman, Times, serif; font-weight:bold; } </style> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script> <script> var auto_refresh = setInterval( function() { $('#load_msg').fadeOut('slow').load('update.php').fadeIn("slow"); }, 3000); //3000 Milliseconds or 3 seconds </script> </head> <body> <div id="load_msg"> </div> </body> </html> Any suggestions on how to solve this would be hugely appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/215642-ajax-auto-refresh-for-chat/ Share on other sites More sharing options...
Legend123 Posted October 11, 2010 Author Share Posted October 11, 2010 Okay right. I have resolved this issue now on Firefox and Chrome by removing the fade functions and works a treat. However I have came across a new problem and thats it does not work with IE - anyone have any suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/215642-ajax-auto-refresh-for-chat/#findComment-1121221 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.