You need to sign in to do that
Don't have an account?
asadim
Loading external JavaScript packages
Hi,
I have a bunch of JavaScript packages written using dojo and stored on some server. These packages are called com.abc.xyz.pkg# (with folder structure like http://server/~company/moduleX/src/com/abc/xyz/pkg#.js), and I want to include them in a VF page. The following doesn't work:
djConfig = { parseOnLoad: true, baseUrl:'./', modulePaths:{'com.abc.xyz':'http://server/~company/moduleX/src/com/abc/xyz'}, isDebug: false, usePlainJson: true }; dojo.require("com.abc.xyz.pkg1"); function onPageLoadHandler() { alert("Page loaded"); }; dojo.addOnLoad(onPageLoadHandler);
The error message is that "com" is undefined. The "Page loaded" message is also never displayed.
Any ideas would be appreciated.