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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is form Element defined ?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How do I know if a particular form element exist in the form or not ? I am writing script on several form elements assuming that they exist. But the display of form elements is conditional. So even before a script function is applied, how do I know whether a form element exist or not. Is there anything like document.form.element.exist (or defined) ??
 
Try...
Code:
if (document.form.element) {
  // process element here
}
Hope this helps,
Jessica
[ponytails2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top