Re: CakePHP Ajax - Getting returned JSON code evaled and into variable

2010-06-25 Thread Joakim
Well, i would say its a cakePHP question, because i am wondering how to do it within the cakePHP framework. if i set it up like this: div id=post /div ?php echo $ajax-link( 'View Post', array( 'controller' = 'posts', 'action' = 'post' ), array( 'complete' = 'callback()' ) ); ? And

Re: CakePHP Ajax - Getting returned JSON code evaled and into variable

2010-06-24 Thread DragonFlyEye
This isn't really a CakePHP question. Have a look at javascript's eval() function: http://www.w3schools.com/jsref/jsref_eval.asp On Jun 24, 10:56 am, Joakim ban...@gmail.com wrote: Hello, I have a ajax link that returns a json datastructure(writes out the json datastructure in the view) and

Re: CakePHP Ajax - Getting returned JSON code evaled and into variable

2010-06-24 Thread Miles J
This isnt a PHP question. Use JSON to parse it into a use able Javascript object. http://json.org/ On Jun 24, 8:17 am, DragonFlyEye dragonflyey...@gmail.com wrote: This isn't really a CakePHP question. Have a look at javascript's eval() function: http://www.w3schools.com/jsref/jsref_eval.asp

Re: CakePHP Ajax - Getting returned JSON code evaled and into variable

2010-06-24 Thread Mike
Just this exact thing this week There's a good example here: http://api.jquery.com/jQuery.getJSON/... if your not using jquery you can use eval() just the same. On Jun 24, 9:56 am, Joakim ban...@gmail.com wrote: Hello, I have a ajax link that returns a json datastructure(writes out the