I have a normal form with the combined selects for country and city, when I send the form no problem, but when I come back to the form for correct the mistakes I can’t see the city I selected and the page didn’t let me see the rest of the select. The script is:
$(document).ready(function(){
$("#country").change(function(event){
var id = $("#country").find(':selected').val();
$("#city").load('1select.php?id='+id);
$("#city").html(options);
$('#city option:first').attr('selected', 'selected');
});
});
I try with the ctrl+shift+k (I don’t remember the name) in Firefox and the only error is “jquery is not defined”. I don’t know what’s wrong with the code.
“to make sure you have the history of your selected values when you return to your form, you can use php as below (I may make some syntax errors as I am not PHP dev)