[Javascript] Swapping an Image

Steve White steve at VirtualMechanics.com
Thu Jul 19 22:44:33 CDT 2001


Thanks on that. We made a lot of updates to add dimensional values to our
CSS styles to support NN6 which seems to require them. We must have
accidentally added them to the image dimensions as well.

-----Original Message-----
From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
Behalf Of Ben Curtis
Sent: Thursday, July 19, 2001 8:22 PM
To: javascript at latech.edu
Subject: Re: [Javascript] Swapping an Image



>> I used to be able to swap an image in NN4.x but after some changes to add
>> support for NN6 it no longer works and I am not sure why.
>>
>> The original image is declared:
>>
>> <img id="GGeo4" Align=Top SRC="bird-1.gif" border=0 width="161px"
>> height="121px">

Keep in mind that attribute values for non-event handler or style attributes
are themselves HTML, and not CSS or Javascript. You don't need to put "px"
in your height and width assignments, since these attributes only accept
pixel values. This shouldn't be your problem for the browsers you mention --
other browsers may choke on it though.


> You use ID to give the image a name, NN4 doesn't recognize this. Use NAME
> instead. I think it's also supported in the other browsers.

Yes, good advice. W3C recommends using both for the time being, even though
it looks weird:

<img id="GGeo4" name="GGeo4" src="bird-1.gif" align="Top" border="0"
width="161" height="121">

--
+Ben Curtis

"You must be the change you wish to see in the world."







_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list