How do I pass a form to a javascript by parameter? This javascript will be executed when a link is clicked. This link is outside the form. I don't think I can use "this.form" since link is outside. How can I achieve this?
pass form as parameter
var myForm = document.getElementById ('the_form_id');
.. and then you use myForm just like you would use this.form I guess.
.. and then you use myForm just like you would use this.form I guess.
you could also name the form:
then you just have to call form_name. ... in stead of this.form. ...
| Code: |
| <form name="form_name" id="form_name"> ... </form> |
then you just have to call form_name. ... in stead of this.form. ...
