[xwiki-devs] How to assign Javascript value in xwiki page using #set method.
Hello, How to assign javascript values using #set method in xwiki pages(Velocity). -- Thanks, Prathap Pandian M
Hi Prathap, the velocity templating, including the #set call, happens on server side and the javscript is executed after that, on the client computer. So you can't use #set to assign a value to a variable. The best you can do is do something like: <script type="text/javascript"> myJsVariable = "${myVelocityVariable}"; </script> Prathap Pandian wrote:
Hello,
How to assign javascript values using #set method in xwiki pages(Velocity).
Thanks Cristain On Mon, Jun 23, 2008 at 7:34 PM, Cristian Vrabie <[email protected]> wrote:
Hi Prathap, the velocity templating, including the #set call, happens on server side and the javscript is executed after that, on the client computer. So you can't use #set to assign a value to a variable. The best you can do is do something like:
<script type="text/javascript"> myJsVariable = "${myVelocityVariable}"; </script>
Prathap Pandian wrote:
Hello,
How to assign javascript values using #set method in xwiki pages(Velocity).
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thanks, Prathap Pandian M
participants (2)
-
Cristian Vrabie -
Prathap Pandian