[eluser]jvk22[/eluser]
I have an ajax function that will not return info on success. When I use firebug, it shows the correct response but when I try to alert the response in the success method it does not work.
Code:
[removed]
$(document).ready(function(){
$("#template_categories").change(function(){
$.ajax({
type: "POST",
url: "<?php echo site_url('sign_up/ajax_change_categories'); ?>",
data: {test:'test'},
cache: false,
dataType:'json',
success: function(html){
alert('go');
alert(html);
if(msg.success){
var result = msg.message;
$('#templates').hide();
$("#templates").html(result);
$('#templates').show();
}
else
{
$('.data').hide();
//var result = '<td>No Data</td>';
//$(".ajax_data").html(result);
alert('No Data');
}
}
});
});
});
[removed]