[thelist] Dynamic javascript?

Matt Warden mwarden at gmail.com
Tue Dec 20 17:02:05 CST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Casey wrote:

> I'm using this to submit a form from a text link.  Trouble is, the name of 
> the form needs to be dynamic.  I am not familiar enough with JS to know how 
> to write the syntax... something like:
> 
> 
> function sendResortCL ( selectedtype, formName )
> {
>   document.resortDataCL & formName & .sortby.value = selectedtype ;
>   document.resortDataCL & formName & .submit() ;
> }

var frm = document.forms[formName];
frm.sortby.value = selectedtype;
frm.submit();

- --
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDqI1mrI3LObhzHRMRAvqqAKCMLdE5XON5UOc64HTcHV+H9CVrlQCbBhm1
rq48g9w79sI0B4IqtCOHCbA=
=k5NU
-----END PGP SIGNATURE-----



More information about the thelist mailing list