Solution : Using JQuery Autocomplete with extraParams
Script :
Source : http://docs.jquery.com/Plugins/autocomplete
$("#ProvinsiCalonSuami").autocomplete("actions/autocomplete.php?p=provinsi", {
max: 100,
width: 260,
selectFirst: true,
});
$("#KabupatenCalonSuami").autocomplete("actions/autocomplete.php?p=kabupaten", {
max: 100,
width: 260,
selectFirst: true,
extraParams: {
provinsi: function(){
return $('#ProvinsiCalonSuami').val();
}
}
});
$("#KecamatanCalonSuami").autocomplete("actions/autocomplete.php?p=kecamatan", {
max: 100,
width: 260,
selectFirst: true,
extraParams: {
kabupaten: function(){
return $('#KabupatenCalonSuami').val();
}
}
});
$("#KelurahanCalonSuami").autocomplete("actions/autocomplete.php?p=kelurahan", {
max: 100,
width: 260,
selectFirst: true,
extraParams: {
kecamatan: function(){
return $('#KecamatanCalonSuami').val();
}
}
});
1 comments:
This design is steller! You certainly know how to keep a reader amused. Between your wit and your videos, I was almost moved to start my own blog (well, almost...HaHa!) Excellent job. I really loved what you had to say, and more than that, how you presented it. Too cool!
Posting Komentar