hassank1 Posted October 19, 2008 Share Posted October 19, 2008 I am working on simple chat.. I am using a div to show the chat history it works normaly with I.E6 .. but whenever I try to use another browser the chat won't shown in the window.. so is there anything wrong or uncompatible with other browser that IE6 in this code : ? function handleReceiveChat() { if (receiveReq.readyState == 4) { var chat_div = document.getElementById('div_chat'); var xmldoc = receiveReq.responseXML; var message_nodes = xmldoc.getElementsByTagName("message"); var n_messages = message_nodes.length; //alert(receiveReq.responseXML); for (i = 0; i < n_messages; i++) { var user_node = message_nodes[i].getElementsByTagName("user"); var text_node = message_nodes[i].getElementsByTagName("text"); chat_div.innerHTML += '<b>' + user_node[0].firstChild.nodeValue + ' : </b>'; chat_div.innerHTML += text_node[0].firstChild.nodeValue + '<br />'; chat_div.scrollTop = chat_div.scrollHeight; lastMessage = (message_nodes[i].getAttribute('id')); }//for mTimer = setTimeout('getChatText();',2000); //Refresh our chat in 2 seconds }//if }//function Quote Link to comment https://forums.phpfreaks.com/topic/129146-not-working-with-firefox/ Share on other sites More sharing options...
hassank1 Posted October 20, 2008 Author Share Posted October 20, 2008 :S .. can't u find anything wrong ? please check here.. this is a link to the code : http://www.studylater.net/chat/chatfrm.php the chat works normally using IE6.. but u can't view the chat using other browsers however u can send the chat msg using other browsers.. thx for the help. Quote Link to comment https://forums.phpfreaks.com/topic/129146-not-working-with-firefox/#findComment-670360 Share on other sites More sharing options...
hassank1 Posted October 20, 2008 Author Share Posted October 20, 2008 btw I've notice something also (donno if this could help): this is the XML : http://www.studylater.net/chat/getchat.php (IE works fine , FireFox give error) Quote Link to comment https://forums.phpfreaks.com/topic/129146-not-working-with-firefox/#findComment-670370 Share on other sites More sharing options...
corbin Posted October 20, 2008 Share Posted October 20, 2008 receiveReq.Send(null); -> receiveReq.send(null); I've also heard of problems with reusing AJAX objects, but the issue was in IE, so I don't think that's it since it would work in others and not IE. Quote Link to comment https://forums.phpfreaks.com/topic/129146-not-working-with-firefox/#findComment-670419 Share on other sites More sharing options...
hassank1 Posted October 23, 2008 Author Share Posted October 23, 2008 I've fixed the problem... it was a case sensitive issue I've wrote recreq.OnReadyState() --> it should be all small --> onreadystate() btw can u moderator remove my above 2 links from the topic ? because it seems I can't edit the posts thx .. Quote Link to comment https://forums.phpfreaks.com/topic/129146-not-working-with-firefox/#findComment-672769 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.