Mark Gillespie wrote:

> My webpage works fine under IE4/5, but there is some simple javascript that
> does not work (at all) under NS6.2 (havn't tried NS4.x, as I don't have it
> loaded)
> 
> http://homepage.ntlworld.com/mark.gillespie/
> 
> Basically, the 5 links in the blue bar at the top, shoudl change the text in
> the table below.  Like I said, it works as expected under IE4/5
> 
> Can some kind fellow have a look, and see If done something stupid (excuse
> me, as I am a HTML newbie...)

I believe the reason it works under IE 4/5 is due to their proprietary 
DOM (Document Object Model) extensions, which let you access the element 
with an id of "mytext" as "document.mytext".  In your code, the 
"document." is implicit.

A quick change to replace :
    mytext.innerHTML="Home.";
with
    document.getElementById("mytext").innerHTML="Home.";
in all the functions will make this work in NS6, mozilla, and IE5.5

I can't test in any other browsers, but I suspect that this should also 
work in other recent browsers (since it's W3C standard DOM)  I can tell 
you for certain, however, that it won't work in NN4.x

-- 
gav


Reply via email to