CodeIgniter Forums

Full Version: Problem with an Ajax Call
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum


I am working on a project.
The things I do work when I run my project on MAMP.
But I uploaded my project on my website:

When the page loads, there is an ajax call being made,
It works with MAMP, but not on the website.
What is very very weird, is that it says
'404 Not Found', but i get the result i want, with a json string with all the data it was suppose to get...

Thanks for your help,


El Forum

[eluser]Dennis Rasmussen[/eluser]
This file returns 404 in the header which is going to mess up jQuery.ajax()

El Forum

so how do I solve this problem?
Because like i said, on my local machine, no problem...


I put this "$this->output->set_header("HTTP/1.0 200 OK");" at the beginning of the function in my controller, now i dont have the error and it works.
But i still dont understand why it worked without it before...