Ok I tried a few things.
My response is:
{"data":{"title":"","year_rec":{"year":"2010"},"description":"","id":"9aaf36
272a1","profile_id":"2608"},"html":"<p>this is a good test<\/p>\r\n"}<p>this
is a good test</p>
With in the controller:
$response['data'] = $this->data['Award'];
$response['html'] = $this->render('dummy');
$this->header('Content-Type: application/json');
echo json_encode($response);
But the html is slashed up \r\n/
Or this:
$response['data'] = $this->data['Award'];
$this->render('dummy');
$this->header('Content-Type: application/json');
echo json_encode($response);
Returns this response:
{"data":{"title":"","year_rec":{"year":"2010"},"description":"","id":"0e46a3
6212a","profile_id":"4b40eea7-2608-4a3b-9c24-7cb04adcd75b"}}<p>this is a
good test</p>
With the html outside of the $response
I am new to the idea of JSON so im not sure what it should look like.
Ideas
Thanks
Dave
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of John Andersen
Sent: January-11-10 3:06 PM
To: CakePHP
Subject: Re: Please help..stuck and no luck
This was my answer :)
[answer]
Now, if I understand it correctly, and I don't have Ajax running yet on my
site, then you just need to use the controllers method - render ( view name
) and save the result in your responce variable.
[/answer]
Enjoy,
John
On Jan 11, 8:28 pm, "Dave" <[email protected]> wrote:
> Sorry I do not see an answer.
>
> I never got one...will check the Google board. For some reason my
> emails from the cake group are sparatic...don't seem to be getting all
> of them for some reason.
>
> Dave
>
[snip]
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.725 / Virus Database: 270.14.130/2607 - Release Date: 01/11/10
04:05:00
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en