Configure HTML/JavaScript

Monday, December 20, 2010

Checking the Request is Ajax

//function to check if the request is made through ajax
function isAjax() {
return (isset($_SERVER['HTTP_X_REQUESTED_WITH']) &&
($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'));
}
}

in reference to: http://php.net/ (view on Google Sidewiki)

No comments:

Post a Comment