I recently perform some ajax request on my website but I'm still beginner.
Here is a stupid question: How to send (POST) a data to the server without waiting any response ?
In all the example I found on internet, the ajax call is used to reload a part of the page. It work perfectly, but my idea here is just to send a data that could be store in DB for example without waiting any response.
I'm using Zend framework with MVC pattern. I tried something like:
$.ajax({
type: "POST",
url:'/controller/action',
data: { myDataToPost: aData },
success:function(response){
},
failure:function(){
alert('Could not save your entry');
}
});
It works fine if I define an action in my controller but I can see in firebug an 404 error on controller/action page. For sure it doesn't exist because i don't want any response...
Many thanks for your help! Cedric.