Welcome Guest, Not a member yet? Register   Sign In
can I call a javascript from within a controller ?
#2

[eluser]vitoco[/eluser]
First you must get understand the difference between server side and client side, the two of them only communicates trough HTTP REQUEST ( client to server ) and HTTP RESPONSE ( server to client ).

SERVER :
- controller
- model
- view
that creates an html[+js+css+images] that it's sent to the browser ( client side )

So, the javascript it's only text in the controller/model/view, and it gets executed in the browser when the C/M/V doesn't exist anymore.

You can solve your problem with and ajax call from the javascript and echoing the html ( text) created in the controller.


Messages In This Thread
can I call a javascript from within a controller ? - by El Forum - 01-23-2010, 08:39 PM
can I call a javascript from within a controller ? - by El Forum - 01-24-2010, 12:25 AM
can I call a javascript from within a controller ? - by El Forum - 01-24-2010, 12:45 AM
can I call a javascript from within a controller ? - by El Forum - 01-25-2010, 05:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB