tomzu
asked on
'null' is null or not an object error on javascript
I've successfully set up Chat (http://www.ebrueggeman.com/phpsimplechat/index.php)
On Firefox and Google Chrome it works fine without errors, but with MSIE6,7 it complains:
'null' is null or not an object error on javascript , about this function
function user_active_ajax(myvar) {
var chatusers = document.getElementById('d iv_chat_us ers');
var currentuser = document.getElementById('d iv_current _user');
//JS Logic
var messageArray = myvar.split(',');
var resultHTML='';
for (var i=0; i < messageArray.length; i++) {
resultHTML = resultHTML + (messageArray[i]+'<br/>')
}
chatusers.innerHTML = resultHTML; <------------------------- ---------- - error line
}
from ajax/functions.js
Ideas?
On Firefox and Google Chrome it works fine without errors, but with MSIE6,7 it complains:
'null' is null or not an object error on javascript , about this function
function user_active_ajax(myvar) {
var chatusers = document.getElementById('d
var currentuser = document.getElementById('d
//JS Logic
var messageArray = myvar.split(',');
var resultHTML='';
for (var i=0; i < messageArray.length; i++) {
resultHTML = resultHTML + (messageArray[i]+'<br/>')
}
chatusers.innerHTML = resultHTML; <-------------------------
}
from ajax/functions.js
Ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Solved by myself :)
For anyone who finds this later, would you please tell us what the problem turned out to be and what your solution was?
ASKER
This is example page of chat script http://www.ebrueggeman.com/phpsimplechat/examples.php
If I use MSIE, after I post a message, all messages dissapear. When you post again, they show up for some time (~2sec) then dissapear again.