[eluser]Tandubhai[/eluser]
$().ready(function() {
$('#select_1').change(function(){
id = $(this).attr('value');
if(id=='') return false;
corresponder = $('#select_2'); // next select menu
$(corresponder).html('<option>Loading...</option>');
$.ajax({
type: "POST",
url: "<?php echo site_url(); ?>/controller/function",
data: 'parentID='+id,
success: function(response){
$(corresponder).html('').append(response);
}
});
});
});