Hi,

2014-05-13 8:40 GMT+02:00 Michael Bußler <michael.buss...@googlemail.com>:

> Hi, the velocity-code is executed on the server, while js-code runs on the
> client side, AFTER the macro-code was executed .
> You could try need to pass parameters to your macro via an URL parameter or
> http POST.
>

Only if value needs to be refreshed without a page refresh. If value comes
from a velocity macro, it's in the context of a page, so it's enough to
initialize the javascript var from velocity (which is ok as velocity is
executed before) - it's not supposed to be updated server-side after the
page is rendered.
Of course if it needs to be dynamic you could go ajax.
Well my understanding of Eduardo is that he needs to initialize a value in
javascript, based on a macro parameter passed to a velocity macro.


>
> Hope this helps!
>
> Best, Michael
> Am 12.05.2014 19:01 schrieb "Eduardo Abritta" <eduardo.abri...@outlook.com
> >:
>
> > Hi Sirs,
> >
> > I am developing a macro in velocity (wiki macro) and need to use a
> > parameter (wiki macro parameter) defined by the user in my java script
> code
> > (java script extension). I tried  can several methods but it is not
> working.
> >
> > How can I do this?
> >
> >
> >
> >
> > Atenciosamente,
> > Eduardo Abritta
> > e-mail: eduardo.abri...@outlook.com |
> >
> >
> >
> > _______________________________________________
> > users mailing list
> > users@xwiki.org
> > http://lists.xwiki.org/mailman/listinfo/users
> >
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to