Hi,
First of all, please use the users mailing list for questions that are
not related to the development of the XWiki platform itself.
Then, regarding your question, JavaScript code is executed in the
browser on the client side while a macro (both Wiki and Velocity --
don't know which one are you referring to) is executed on the server.
So they cannot directly call each other because they are from two
different worlds. Moreover, the macro is executed before the
JavaScript code.
What you can do is:
* either use the macro to generate some JavaScript code (even inside
the JavaScript extension, but you need to specify that the extension
code has to be parsed on the server side before being served to the
client)
* or make an AJAX request from the JavaScript code to a wiki page that
calls the macro.
Hope this helps,
Marius
On Mon, Nov 12, 2012 at 3:30 AM, firmusoft.xwiki
<firmusoft.xwiki(a)gmail.com> wrote:
Can we call a macro from a javascript extension
Thanks,
Firmusoft
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs