my jquery is not populating the div myPrint on either success or failure.
here is my ajax
$.ajax({
type: 'POST',
url: 'file.php',
data: 'tyID=' + tyID.value ,
success: function(success) {
if(success == 1) {
$("#myPrint").html('Worked');
} else {
$("#myPrint").html('there Didnt work');
}
}
});
in php I have success = 0 on failure and 1 on success. I can see php working fine
here is html
<div id="myPrint"></div>
Try this