/ Published in: PHP

A simple function to check if the request comes from an AJAX XMLHttpRequest.
Use it if your page should behave differently when called from AJAX.
Comes from jquery mailing list: http://jquery.com/discuss/2006-June/006656/
Use it if your page should behave differently when called from AJAX.
Comes from jquery mailing list: http://jquery.com/discuss/2006-June/006656/
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function isAjax() { ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')); }
Comments
