Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing form objects to a function 1

Status
Not open for further replies.

awingnut

Programmer
Joined
Feb 24, 2003
Messages
759
Location
US
I know how to pass a form to a function but I can find how to pass 'this' object to a function.
Code:
<input type="checkbox" name="carrier[0]" onClick="myFunction(this.form.carrier[0])">
The above gets an error telling me 'carrier' has no properties. I need to be able to set the 'value' among other things for the object. Can someone help me with the right syntax? TIA.
 
Thanks for the reply. I didn't fully understand what 'this' was used for. Now I think I see and it works fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top