$(document).ready(function() {
$("#ddlprod").change(function() {
var pk= $("#ddlprod").val();
$.ajax({
url: "ajaxprintdropdown.php",
type: "POST",
data: 'pk='+pk,
timeout: 5000,
success: function(output) {
$('#divtesting').show(); //works well
$('#divtesting').html(output); //works well
},
});
$("#ddltesting").change(function(){
alert('a'); //not functioning at all
var c= $("#ddltesting").val();
alert(c); //not functioning at all
});
});
ajaxprintdropdown.php's output
<select name=ddltesting id=ddltesting >
<option value=''>--Select--</option>
<option value='test1'>bla for test1</option>
<option value='test2'>bla for test2</option>
</select>
Jquery not working for multi level dependency?
$("#ddltesting").change(function(){
no response at all