is_ajax_request does not recognized XMLHttpRequest |
10-04-2018, 10:02 AM
(This post was last modified: 10-04-2018, 10:04 AM by InsiteFX. Edit Reason: add lines )
Not sure what JavaScript or framework your using some do not send the HTTP_X_REQUESTED_WITH header. jQuery doe's send it.
You can try this and see what you get this is the old way that we use to do it. Code: define('IS_AJAX', isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'); You can place the define in your ./application/config/constants.php file or were you want. You may need to send the header yourself. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Messages In This Thread |
is_ajax_request does not recognized XMLHttpRequest - by tecthon - 10-04-2018, 02:58 AM
RE: is_ajax_request does not recognized XMLHttpRequest - by InsiteFX - 10-04-2018, 10:02 AM
RE: is_ajax_request does not recognized XMLHttpRequest - by dave friend - 10-04-2018, 09:15 PM
RE: is_ajax_request does not recognized XMLHttpRequest - by jreklund - 10-04-2018, 10:38 AM
|