Re: What is planned for these attributes?

At 7:45 AM -0500 1997-09-09, Arnaud Le Hors wrote:
>> First, I have a JavaScript that requires the use of a NAME attribute in an
>> IMG tag. This attribute has not been included in any of the W3C DTDs as
>> yet, and doesn't appear to be in the 4.0 draft yet either.
>>
>
>Sorry, I don't understand what "a JavaScript that requires" means. Where
>does this piece of code comes from? How does this mean the IMG element
>has to have a name attribute? Couldn't that simply be a bug in the
>script instead? As far as I know no W3C vendor ever asked for this
>attribute to be added...
>--
>Arnaud

I think I know the script he is referring to.  The fact is, quite a lot of
JavaScript scripts out there rely on using name as identifiers.  For
example:

<SCRIPT Language="JavaScript">

function ChangeImage (imagename) {
	document.imagename.src = imagename + "hilighted.gif"
}

</SCRIPT>

<BODY>

<A HREF="nextpage.htm" onMouseOver="ChangeImage('next')"><IMG NAME="next"
SRC="next.gif"></A>


This script would cause the next button to become hilighted when the mouse
passes over it (nexthilighted.gif would be the hilighted version of the
button, and would replace the image "next.gif").

Most elements, however, can, I think, be referred to numerically.  However,
this is much more difficult, especially when changing a page's layout or
content or when trying to "debug" the script.

--------------------------------------------------------
[                    Jordan Reiter                     ]
[            mailto:jreiter@mail.slc.edu               ]
[ "You can't just say, 'I don't want to get involved.' ]
[  The universe got you involved."  --Hal Lipset, P.I. ]
--------------------------------------------------------

Received on Tuesday, 9 September 1997 15:38:43 UTC