Couldn't find any valueable answers on this question: Its a pretty basic ajax form process handler:
$(document).ready(function(){
});
function functionToUpdate(id)
{
var data = $('form').serialize();
$('form').unbind('submit');
$.ajax({
url: "Blahblah.php",
type: 'POST',
data: data,
dataType:"json",
beforeSend: function() {
},
success: function(msg)
{
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert(req.responseText);
}
});
return false;
}
Works fine to update stuff in the mysql database. (This is a php file) I check in the php file the values , with different checks as isset($Post) etc.
So for example:
if(isset($_POST['submit']))
{
//do stuff here if button is clicked
}
else{
// play a nice error message
}
How to get this info from the url displayed in the ajax's succes part? something like this: (For example)
success: function(msg)
{
if(post = true)
{
$('#succesfull').html("Succesfull query").fadeIn(800)
}
else
{
$('#fault').html("U didn't fill stuff in, failed!").fadeIn(800)
}
},
For example this upset. But i just can't get this data from the focused url.
all help is appriciated.