Link to home
Start Free TrialLog in
Avatar of tomzu
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('div_chat_users');
      var currentuser = document.getElementById('div_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?
ASKER CERTIFIED SOLUTION
Avatar of mverschoof
mverschoof
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tomzu
tomzu

ASKER

That partly solved my problem. Is anyone willing to help more?

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.
Avatar of tomzu

ASKER

Solved by myself :)
Avatar of David S.
For anyone who finds this later, would you please tell us what the problem turned out to be and what your solution was?