Click to See Complete Forum and Search --> : innerHTML with Opera problem.


Nedals
03-05-2003, 02:53 PM
I'm using this to change a message in a DIV

document.getElementById('message').innerHTML = msgAry[no]

It worked as expected in IE5, IE6, and NS7 but nothing happens in Opera 6.01. I read an article that stated that Opera does not correctly support 'getElementById' and that I should use 'document.all' (re: IE4) instead. This did not work either.

Please help! :confused:

Jona
03-05-2003, 03:00 PM
Maybe you could try this...

divName.innerHTML = msgArray[no]

That works in IE. I know that, but I've never used Opera. Maybe a browser-sniffer script should be used to edit the code depending on which browser is being used. But then, we obviously still need to get the code for Opera. Sorry, maybe I shouldn't 've posted.......

Nedals
03-05-2003, 03:58 PM
Sorry, maybe I shouldn't 've posted.......
It's the thought that counts! :)