[ale] html/javascript question.. linux < OT < baseball strike
Fulton Green
ale at FultonGreen.com
Tue Aug 20 16:08:38 EDT 2002
Two things that might be going wrong here:
1) HTML 4.0x deprecates the 'name' attribute, preferring the 'id' attribute
instead.
2) A less likely problem could be that the value of the 'name' attribute
needs to be delimited by double-quotes, as in name="foo" .
And, as usual, be sure to test in newer and older browser versions.
On Tue, Aug 20, 2002 at 03:43:45PM -0400, Geoffrey wrote:
> For a long while now I I've used a bit of javascript to change an image
> when the image is selected (onMouseDown()). To do this, the img tag
> contains a 'name=foo' attribute which is used by the javascript to
> locate the image.
>
> I just happened to run the w3c html validator against this code and it
> notes that 'name=foo' is not a valid attribute for HTML 4.0. Removing
> the reference rids me of the validator error, but then the onMouseDown()
> does not work, and I get a javascript error in the javascript console.
>
> Anyone else doing something like this, I guess in a different way, so as
> to please both html 4.0 and javascript??
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list