5 replies
The reference to the second image is dependent on the "alt" attribute of the first image being set by the time the second script executes. It's entirely possible the NN4.?? has n't build the DOM model of the page by the time it gets to the second script. Alternatively (no pun intented :-) it could be that NN4 does n't have "ALT" as one of the attributes of an image in its DOM.
Use the variable mystring in place of document.left.alt in the second script. Variables you declare are gobal to the current document.
The first script is:
...
The second is:
I'd also recommend a tidy-up of the script tag. Since the "language" attribute is deprecated, include a "type" attribute, and make sure that the second script contains its internal HTML comment:
by shanghai sam
by jay eckles
According to
http://developer.netscape.com/docs/manuals/js/client/jsref/image.htm#1193137
alt is not an attribute of an Image object. That's your problem.
Jay Eckles
by shanghai sam
by beichinger
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending