• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
_remap ignoring IS_AJAX call?

I have a controller called redirect.php that redirects from and to views. This controller for the most part has one public _remap function that does all the redirecting with a case statement. Everything has been working great until I sent a $.POST from a view back to the controller. I want it to hit the _remap and look for the fact that the request is coming from AJAX then do it's case.

I have a
constant I'm checking against.

define('IS_AJAX', isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');

but whenever I hit the page it's always remapping to the default and sending my request to that page where it's basically returning me that pages data back when I'm echoing and alerting the data to and fro.

Any insights?

post the _remap?

nevermind, my bad

see http://stackoverflow.com/questions/69157...-ajax-call

I was using IS_AJAX as a URL function.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.