Jump to content

not working with firefox


hassank1

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/129146-not-working-with-firefox/
Share on other sites

: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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.