[thelist] JavaScript help passing variable from HREF to FORM

Christian Heilmann codepo8 at gmail.com
Thu Jan 26 18:03:04 CST 2006


> <a href="javascript: void();"
> onClick="document.logonForm.url.value='http://library.alldatapro.com';
> document.logonForm.submit();">link</a>

God, if you don't bother about non-JavaScript users at all, why bother
with a void on the href and not just do the lot as a JavaScript link.

If you want to do things in a degradable manner, then use an onsubmit
handler or generate the link via JavaScript.

It might also not be the best approach to write a lot of inline JS and
simply use a function that embeds all the calls.



More information about the thelist mailing list