[thelist] Back to the 'javascript:;' thing
Michael Pemberton
mpember at phreaker.net
Thu Jul 5 09:20:20 CDT 2001
i think they both are faulty. the onclick vlaue should be PURE javascript.
It is not allowed to contain the "javascript:" part of your example code.
also, I believe that the first version is more compatible with more browsers
that the second version. The <img> does not have an onclick method until only
the very latest incarnations.
Hershel Robinson wrote:
> Hello Evolters, new reader of the list here, making a little post:
>
> Does anyone know if there is any difference between the following two
> options:
>
> <a href='javascript:;' onclick='javascript:myFunction();'>
> <img src="myimage.jpg" border=0>
> </a>
>
> <a href='javascript:;'>
> <img src="myimage.jpg" border=0 onclick='javascript:myFunction();'>
> </a>
>
> I realize that the second one does actually need the A HREF to work, but I
> put it there so that the mouse will change to cute little hand cursor when
> it's over the IMG--this makes it clearer to the user that this IMG is
> clickable.
>
> Thanks,
> Hershel Robinson
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
--
Michael Pemberton
mpember at phreaker.net
ICQ: 12107010
More information about the thelist
mailing list