Forums

joomla 1.7.4 - CF4 The Ajax - response: " ↵"ok""

rushseeker 03 Feb, 2012
I buy the little manual in greyhead's site. I'm making AJAX check email.

I have a problem: response text is unclear:
PHP

$response ='ok';
print json_encode( $response );

i'm making a JSON.encode of response... but...
the response in javascript is:
response: "\r\n\"ok\""

there is a ↵, why?
is it the server that make this? it's a problem of header?
rushseeker 03 Feb, 2012
i solved with this code

[...]
onComplete: function(r){
r=JSON.decode(r).replace(/\"/g,'');

[...]
This topic is locked and no more replies can be posted.