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

Submit only sending 1 of 24 form elements

Status
Not open for further replies.

earme

Programmer
Jul 27, 2000
155
US
I have a page in an iframe that submits its form to the parent using '<form METHOD=&quot;POST&quot; action=&quot;order.asp&quot; id=&quot;orderitem&quot; name=&quot;orderitem&quot; target=&quot;_parent&quot;>' This has worked fine in other places of my web app. However, in this instance this is the code that submits the form:

<table align=center border=0 cellspacing=&quot;3&quot;>
<tr>
<td width=&quot;140&quot; align=center>
<input type=&quot;submit&quot; value=&quot;Customer Info&quot; id=&quot;cust_info&quot; name=&quot;submit1&quot; class=&quot;button&quot; onClick=&quot;passItAlong(orderitem, 7, 0)&quot;></td>
<td width=&quot;140&quot; align=center>
<input type=&quot;text&quot; name=&quot;itemNum&quot; value=1 size=2 maxlength=2>
 of 1 
<input type=&quot;submit&quot; value=&quot;Go&quot; id=&quot;go&quot;name=&quot;submit1&quot; class=&quot;button&quot; onClick=&quot;passItAlong(orderitem, 8, 0)&quot;></td>
<td width=&quot;140&quot; align=center>
<input type=submit name=&quot;submit1&quot; value=&quot;Summary&quot; id=&quot;summary&quot; name=&quot;submit1&quot; class=&quot;button&quot; onClick=&quot;passItAlong(orderitem, 9, 0)&quot;></td>
</tr>
</table>

orderitem is the name of the form. It has 24 elements in it, the other 23 are in another table, also contained in the <form></form> tags. passItAlong sets the value of an input of type hidden.

My problem is that of those 24 elements the only one that is being passed to the next page is itemNum, which occures in the above code. On the page that this code occurs on it knows all the elements of orderitem.

Why isn't this working?!

Thanks in advance,
Earme
 
But if you have two separate forms (which appears to be the case (?)) their form elements are completely independent of each other. I mean, you have to have the elements that you want to submit inside the <form name=&quot;frm1&quot; action=&quot;your.cgi&quot;></form> pair! Otherwise the form doesn't see the elements.
I hope this helps.
---
---
 
There is 1 form with elements in 2 tables (all on the same page).
I figured out the problem though, a stupid programmer error, I had disabled the entire form, except for the buttons and that one element, itemNum (with a javascript). And the form doesn't pass on elements that have been disabled. So, I changed it so that the fields that MUST be passed, hidden fields incedently, are not disabled.
Oops....

Thanks!
Earme
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top