I have an IE problem. I am using the jquery ajax method to call a php script. The php script just calls die(). In firefox, the error message is displayed, but in IE the success message is displayed without any data. I would prefer the error function to be called.
Is there any way to fix this? I'm guessing my javascript code needs change somehow.
Thanks!
<?php
die()
?>
$.ajax({
url: "phps/php.php?id="+the_id,
dataType: "json",
error: function(){
alert('error');
},
success: function(data){
alert("SUCCESS");
}
});
source
ajax()
and php combination. try reading this.I guess Firefox and the other browsers do consider an empty call an error, but IE does not, try this in your PHP script if you want to cause all of them to err:
From wikipedia: