faqts : Computers : Programming : Languages : JavaScript : Forms

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

5 of 6 people (83%) answered Yes
Recently 5 of 6 people (83%) answered Yes

Entry

How can I derive the From Object that a Form Element belongs to? [IE/NN]

Dec 9th, 2002 08:33
Ralph Brown, jsWalter,


all form elements have a pointer called "form" that points back to 
their parent form object.
<FORM name='myform'>
 <INPUT type='button' onclick='alert(this.form.name);'>
</FORM>
("this" refers to the button, .form refers to it's parent form)