Forum Moderators: open
I have created the select box(combo box) in disabled mode.
I have made the default one value as "selected".
When i tried to submit the form,the disabled select box value is not posted(get/POST).
<form action="">
<select name="sample" >
<option value="testing" selected>Testing</option>
<option value="testing2">Testing2</option>
</select>
<input type="submit" name="but"/>
</form>
I would like to submit the form with the value of that combo box which is disabled mode.
Help me to fix this issue.
Thanks
ravi
<script>
function enableSample() {
document.getElementById('sample').disabled=false;
}
</script>
<form action="" onsubmit="enableSample();"
<select name="sample" id="sample">
<option value="testing" selected>Testing</option>
<option value="testing2">Testing2</option>
</select>
<input type="submit" name="but"/>
</form> hope that helps