Welcome Guest, Not a member yet? Register   Sign In
Controller echo response to Ajax request. Wrong?
#1

[eluser]jefc[/eluser]
Hi,

Is it wrong to have a controller method which has been invoked by an Ajax request respond with a straight echo? Then the success function in the Ajax request shoves this into a user message div somewhere.

A tiny bit of background - am trying to mould Ion Auth's password change facilities into an Ajax context. Although the question is obviously general in nature.

Thanks in advance for any input.
Geoff
#2

[eluser]PhilTem[/eluser]
Code:
$this->output->set_output();
is safer than an echo and the proper way of doing it!
#3

[eluser]jefc[/eluser]
Ahh much more elegant. I should have worked that out for myself.

Thanks!




Theme © iAndrew 2016 - Forum software by © MyBB