This is bugging me for over 2 hours now, and I just don’t see it.
I have a form, which has it’s validation in PHP. So what I do is create an AJAX-call, on based on the returned response I submit, or don’t submit the form. This is my AJAX-call:
$("#savePO").click(function() {
$.ajax({
type : 'POST',
url : 'ajax/newpo_check_ajax.php',
data : $("#newpoform").serialize(),
succes : function(respons) {
alert(respons);
}
});
});
The response page (newpo_check_ajax.php) is just:
<?php
echo "AJAX IS WORKING!";
?>
When I check Firebug, it states that the response is indeed what it should be (“AJAX IS WORKING!”), but whatever I try, I don’t get the response to alert!
The above jQuery code is on the bottom of my page, since it didn’t work at the top (inside $(document).ready()).
Any help is appreciated! 🙂
EDIT: Unfortunately I wasn’t able to read properly anymore. I forgot an S in success, on which.
The correct spelling is
success, notsucces. You’re missing ansat the end.