How do I check if the request is an AJAX? I am using CodeIgniter. I have a link that when it clicked, it\'ll open the pop-up dialog window this is done through ajax it reque
If you are using a library that sends the X-Requested-With header, then you can do...
X-Requested-With
if (strtolower(filter_input(INPUT_SERVER, 'HTTP_X_REQUESTED_WITH')) === 'xmlhttprequest') { // I'm AJAX! }