[xwiki-devs] About xwe.onInjectionDone
Hi Everyone, Hi Marius, Here is the code that I embeded in the Xwiki page, I just only include js/xwiki/mail/mail.nocache.js just once: {{velocity}} $xwiki.jsfx.use("js/xwiki/mail/mail.nocache.js", true) {{html}} <div id="DR_TreeView"></div> {{/html}} {{/velocity}} or {{velocity}} $xwiki.jsfx.use("js/xwiki/mail/mail.nocache.js", true) {{/velocity}} {{html}} <div id="DR_TreeView"></div> {{/html}} This will result at the top of the page that have the clickable Mail example functioning well, at the bottom it follows two unclickable Mail example, just like html displayed. And follows 6 xwe.onInjectionDone('xwe') sep . It seems although I used $xwiki.jsfx.use, the JavaScript code still parsed as wiki syntax and display as text. So what should I do? You said "to include the JavaScript code so that it ends up in your HTML page's head not body".
participants (1)
-
Leon Wang