Jump to content

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.

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.