Answer the question
In order to leave comments, you need to log in
There is such a plugin for such selects that take data from json?
Answer the question
In order to leave comments, you need to log in
<script type="text/javascript" charset="utf-8">
$(function(){
$("select#city").change(function(){
$.getJSON("/select.php",{id: $(this).val(), ajax: 'true'}, function(j){
var options = '';
for (var i = 0; i < j.length; i++) {
options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>';
}
$("select#myselect").html(options);
})
})
})
</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question