I had to change the values of a dropdown basis the selection of a radio button so i used jquery to check the selected radio button and populated the dropdown accordingly.
Now, when i select a value from the dropdown and submit the form the dropdown value doesnt get posted. Please help. The code i used :
<select style="width:120px; margin-left:5px;" name="sPriceMin1" id="describe1">
<option value="" selected>Min Price</option>
in the script :
var listA = [{name:'0', value:'0'}, {name:'10 Lacs', value:'1000000'}, {name:'20 Lacs', value:'2000000'},{name:'30 Lacs', value:'3000000'},{name:'50 Lacs', value:'5000000'},{name:'70 Lacs', value:'7000000'},{name:'1 Cr', value:'10000000'},{name:'1.5 Cr', value:'15000000'},{name:'2 Cr', value:'20000000'},{name:'3 Cr', value:'30000000'},{name:'5 Cr', value:'50000000'}];
$(document).ready( function() {
$('#describe1').empty();
$.each(listA, function(index, value) {
$('#describe1').append('<option value="'+value.value+'">'+value.name+'</option>');
});
});
I am unable to fetch the values of the dropdown in my php code. Please help.