Why would you want a Controller to execute JS code? Moreover, to clear
any confusion, JS is executed on the client-end (Browser) not the
server! So having controller execute the JS Code is not going to
happen. If you were looking to have a call (myJSFunction) added to
your rendered view(output html) of a specific controller action then
this would have to go in the view and not the controller.
So the best place for the code that you have given is in the view and
not in controller. I hope this answers your query!
Cheers,
Ketan :-)
On Jun 4, 10:06 pm, "Herman Vega" <[EMAIL PROTECTED]> wrote:
> Hi all, is possible call from PHP controller to execute any javascript code?
>
> something like:
>
> $obj->addScriptCall("myJSFunction", "arg 1", "arg 2", 12345);
>
> Best regards
>
> --
> Herman Vega Jara
> hvegax[a]gmail.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---