Quantcast
Channel: Marion Newlevant: Web Developer » CodeIgniter
Viewing all articles
Browse latest Browse all 2

WordPress + CodeIgniter + AJAX + 404 errors

$
0
0

Added an ajax call to my CodeIgniter + WordPress app, and I got back the result I wanted, but with a 404 header. Found the description (and solution) here: http://stackoverflow.com/questions/2393452/ajax-response-call-404-not-found

Changed my ajax controller function to look like this, and it worked:

function getPortfolioPost() {
  header("HTTP/1.1 200 OK"); // Added this line
  $ret = array('this'=>'that');
  $this->output->set_output(json_encode($ret));
}

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images