Welcome Guest, Not a member yet? Register   Sign In
Ajax Cannot modify header information
#1

[eluser]bpdp[/eluser]
Hi all,
I'm converting a PHP / Prototype website over to codeigniter, but I'm having trouble using Ajax. This is my first codeigniter project so I'm not really sure if I'm doing this right or not but... here goes.

My javascript calls functions that are in a model. the model uses an echo statement to output the (HTML) results. Which worked in the original site. The query works and the code works (as it updates the element that it should) but immediately following the results I get an error:

-------
Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /Library/WebServer/Documents/ci/todo/src/application/models/user_scripts/selectormodel.php:45)

Filename: helpers/url_helper.php

Line Number: 487
-------

And yes I checked for whitespace. I have the url helper setup to autoload and prior to getting this error I was getting an error in my controller that I fixed. I guess I can't see why my controller or my url helper get loaded again with an asynchronous request.

any ideas on how I can fix this or a better way of setting up my code would be great.

Thanks


Messages In This Thread
Ajax Cannot modify header information - by El Forum - 03-13-2008, 09:07 PM
Ajax Cannot modify header information - by El Forum - 03-14-2008, 03:02 AM
Ajax Cannot modify header information - by El Forum - 09-07-2008, 10:04 AM
Ajax Cannot modify header information - by El Forum - 09-07-2008, 03:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB