FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

pass form as parameter

 


kv
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?
adhoc
var myForm = document.getElementById ('the_form_id');

.. and then you use myForm just like you would use this.form I guess.
Chris Tiaens
you could also name the form:
Code:
<form name="form_name" id="form_name"> ... </form>

then you just have to call form_name. ... in stead of this.form. ...
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.