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

know if there is a input in the form 2

Status
Not open for further replies.

tyris

Programmer
Nov 2, 2000
311
FR
hi all,

i have a page that is dynamically filled. i mean i do have a form with many select, option, and textarea that are sometime in the page and sometime not (depends on many things).

what i'd like to know is if there is a way to know if the textarea, or the select named toto is on the page

i need to take the value entered in, but i know that if you do this for exemple :

document.myForm.toto.value
and if toto is not on the page, it will return an error.

is there a way to test if toto exists before to get the value ?

Best regards,
Elise
 
the following will return true:

typeof(document.myForm.toto)=="undefined"

if toto is not defined jared@aauser.com
 
i used the 2 tips
the browser gives this error :

Object doesn't support this property or method

Best regards,
Elise
 
post some more of your code... maybe we can find the problem. jared@aauser.com
 
that's okay i found the problem
everything works
thanks ! Best regards,
Elise
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top