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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.