Re: how to pass data from controller or view to javascript

2011-02-15 Thread cricket
On Tue, Feb 15, 2011 at 5:31 PM, netusco wrote: > in the book I had found the function set() from JsHelper but there's no > examle there... > > googleing I found an example that doesn't work for me... it's like this: > > after loading Js Helper on the controller... > > $this->Js->set('someTest', '

how to pass data from controller or view to javascript

2011-02-15 Thread netusco
in the book I had found the function set() from JsHelper but there's no examle there... googleing I found an example that doesn't work for me... it's like this: after loading Js Helper on the controller... $this->Js->set('someTest', 'amazing discovery'); alert('Set in the CakePHP view using Js