Another why won't my jquery ajax work in ie question
Just want to make sure my test code below is proper. I've been reading and it seems html syntax errors renders the jquery ajax unusable in ie?
There are a bunch of include开发者_如何学Cs where this code resides, so is it possible there is something wrong in one of those files, having nothing to do with my ajax code?
$("#checkEmail").blur(function(){
$.ajax({
type: "POST",
url: "adamcheck.php",
data: "checkit=" + $("#checkEmail").val(),
success: function(output){
$("#userCheck").html(output);
}
});
});
adamcheck.php
<script type="text/javascript">
$(document).ready(function() {
alert("FGHFGHGFH");
});
</script>
<?php
if(isset($_POST['checkit'])){
$email= $_POST['checkit'];
echo "<p>$email</p>";
}
?>
The only possible way in such a situation (where you have doubts on many things) is to debug step by step, entity by entity. First clear your doubt on the AJAX post. Take only this code and the necessary minimum HTML and php code, put them in a separate setup (separate from your project). There is no shortcut to this.
If this works, then move on to the bunch of includes. There
By the way, your AJAX post code looks syntactically correct and it is a very basic and simple.
精彩评论