C
cmc_dermo
I have a form that has a select list.
A user chooses a value and the page refreshes showing the selected
value in the dropdown box.
So I want to use Javascript to get the selected query from the form.
I then want to pass it as a hidden field.
So for example the section of the page I'm interested in will look like
this.
<form action="asubmitpage.htm" method="post">
<select name="ent" onchange="form.submit();">
<option value="UK">UK</option>
<option selected value="USA">USA</option>
<option value="JAPAN">JAPAN</option>
<option value="UK">UK</option>
</select>
I then want to take the selected value and submit it as a hidden field.
<form action="setpov.htm" method="post">
<input type="hidden" name="Entity" value=" this is where i want to fill
this with the selected value ">
</form>
I take it javascript is the easiest way to do this.
Regards
Craig
A user chooses a value and the page refreshes showing the selected
value in the dropdown box.
So I want to use Javascript to get the selected query from the form.
I then want to pass it as a hidden field.
So for example the section of the page I'm interested in will look like
this.
<form action="asubmitpage.htm" method="post">
<select name="ent" onchange="form.submit();">
<option value="UK">UK</option>
<option selected value="USA">USA</option>
<option value="JAPAN">JAPAN</option>
<option value="UK">UK</option>
</select>
I then want to take the selected value and submit it as a hidden field.
<form action="setpov.htm" method="post">
<input type="hidden" name="Entity" value=" this is where i want to fill
this with the selected value ">
</form>
I take it javascript is the easiest way to do this.
Regards
Craig