i am trying to submit values of form.
but all values other than a <select>
field is not submitted because i think its inside div element as shown in code below
<form action="next.php" method="post">
<input>....
<input>....
<input>....
<select name="asdf"> <!--This field submitted successfully -->
<option value="wtevr"> </option>
<option value="wtevr2"> </option>..........
</select>
<div>
<select name="asdf2"> <!--problem is here submitting this field -->
<option value="wtevr11"> </option>
<option value="wtevr22"> </option>..........
</select>
</div>
</form>
I used div
because this is part of my ajax code through which i update the values in select field.
Is there any alternative solution to submit this select
field form?
MY approach:
I think that there is a solution if i use a hidden
input
field in this form whose value get equal to value of select field before submitted the form.
<input type="hidden" value="<!--comes from JavaScript code -->">
I am new to JavaScript so any help is appreciated..