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!

nested forms in javascript

Status
Not open for further replies.

greyone

Programmer
Dec 14, 2000
200
CA
Hello everybody. Suppose you have this structure :
<form name=&quot;super&quot;>
<form name=&quot;sub&quot;>
<input type=&quot;hidden&quot; name=&quot;whatever&quot; value=&quot;4&quot;>
</form>
</form>.
How can I access via Javascript to the &quot;whatever&quot; value? I have tried :
document.super.sub.whatever.value, of course, it doesn't work. Please help
 
why are you using nested forms? I have never seen a situation where this is necessary, nor a solution to your problem jared@aauser.com
 
You cannot nest forms. It doesn't work with HTML or JavaScript. If you need different actions to be taken depending on different fields, then that is something you will have to do with client- or server-side scripting of a single form.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
yes, tom &amp; jaredn are right ! and i think i guess what you want to do with 2 forms, and the very best way is to do 1 form and 2 (or as many as you neeed) validation functions
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top