thanks a lot... -- Thanks, Prathap Pandian M On Wed, May 21, 2008 at 9:25 PM, Sergiu Dumitriu <[email protected]> wrote:
Prathap Pandian wrote:
Hi,
How to call a java script file in XWIKI page.
I want to validate a form in XWIKI page, and i am having a script file, don't know how to call the file.
For example in HTML we call the js file using this tag <script language="javascript" src="login.js?randomJsVer=84" ></script>, like this is there anyother way to call the js file in XWIKI.
You do the same, but the src URL will probably be different.
If the js is in the skin directory, use src="${xwiki.getSkinFile('login.js')}?randomJsVer=84"
If the js is attached to the document containing the form, use src="${doc.getAttachmentURL('login.js')}?randomJsVer=84"
If the js is someplace else, just copy its full address and put it in the src, like src="http://www.someserver.org/login.js" -- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs