-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all,
I want to exclude from my workspace a javascript file because it will be used from other workspaces.
Until now I was doing this in my page init class:
Script s = new Script(); s.setSrc("/recursos/js/FuncionesComunes.js");
Now I'm trying to set an absolute path to de javascript file in setSrc(). But it seems it doesn't find the file.
How can I include an external javascript file in my project?
Thank you!
Hi I have the same problem
I write this at the top of my page and it doesn't work:
<?script src="///D$/StsDocumentosAppWeb/Javascript/FuncionesComunes.js"?>
Otherwise I want to use the script on all my pages, I have to write it in every zul?
Neus,
If it doesn't have to be dynamic, you could try the script directive at the top of your zul like this:
<?script type="text/javascript" src="/scripts/myScript.js"?>
Or you could try the <script> tag like this:
<script src="/scripts/myScript.js" defer="true"/>
Have a look here for more info...
Just some thoughts...
Regards,
Todd
Asked: 2011-02-22 04:06:03 +0800
Seen: 555 times
Last updated: Oct 14 '13