[thelist] Jscript vs. N4.7

Richard Bennett richard.bennett at skynet.be
Tue Sep 4 07:32:35 CDT 2001

----- Original Message -----
> Hi all,
> Can anyone tell me why this here script doesn't work in dear old Netscape
> 4.7.

> document.images["flasher"].src = swopImg[image].src;

Just in case you didn't know, although NS4 supports document.images[] , it
regards each <div> with an id, and it's position  set, as a new document
nested inside the first.
So if your page looks like this:

    <div id="holder">
        <img id="flasher" name="flasher" src="blah.gif" />

Your script would look something like this:

    document.holder.document.images["flasher"].src = swopImg[image].src
    document.images["flasher"].src = swopImg[image].src

Also, the word "image" may well be a reserved word in NS4.

Richard Bennett

mail at richardinfo.com

More information about the thelist mailing list