[thelist] Javascript submit()

.jeff jeff at members.evolt.org
Wed Oct 10 11:04:24 CDT 2001


paul,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Paul Backhouse
>
> eg:
> <a href="#" onclick="javascript:
> document.name.submit();"><img src=image.gif border=0></a>
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

fwiw, the "javascript:" in the onclick event handler is completely
unnecessary and even prone to causing problems in some browsers.  the
language is already assumed to be javascript for the event handler unless
otherwise noted.

also, there are numerous reasons to not use a hash (#) as the href
attribute's value to create a dummy link.

and finally, rendering a form useless to non-js users is a monster
accessibility no-no.

please *don't* take this as a "if you can't get it right, don't help" reply.
that's not what it is at all.  i'm simply trying to identify some
inconsistencies and help clarify some things.

thanks,

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/






More information about the thelist mailing list