hi all I have seen many question but no one has fulfilled my thirst. I want to populate select on the basis of one other select. I am using zend framework. I have a select t
You need to bind a change event for your first dropdown. Then in that dropdown you need to call an ajax function to your php page, which will give you the new selection for your 2nd dropdown. and on the first dropdown's ajax success function you will populate the 2nd dropdown.
For ajax calling you can see http://api.jquery.com/jQuery.ajax/
Sample:
$(document).ready(function(){
$('#ddl_account').change(function(){
$.ajax({
type: "POST",
url: "account.php",
data: "account=" + $(this).val(),
success: function(options){
//options = ""
$('#ddl_account_2nd').empty().append(options);
}
});
})
})