I want to submit a hidden form when a value is entered into a text input field that is part of another form.
<form name="TDISLabelForm" target="fr1" method='POST' action="/createLabelTDIS.do">
<input type="hidden" name="lab_no" value="<%=lab_no%>">
<input type="hidden" name="accessionNum" value="<%=accessionNum%>">
<input type="hidden" id="label" name="label" value="<%=label%>">
</form>
<iframe style="height:1px;width:1px;border:none:" id="fr1"></iframe>
<form name="ackForm" method="post" action="/UpdateStatus.do">
<button type="button" value="Label">Label</button>
<input type="text" id="label" name="label" value="<%=label%>"/>
<input type="button" onclick="TDISLabelForm.submit()" value="Create">
</form>
I want to submit the value of “label” when I click on the Create button that submits TDISLabelForm. How can this be done?
Thanks for your help.
This is a start, to get you on your way http://en.wikipedia.org/wiki/XMLHttpRequest