123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- if (typeof dojo == "undefined") {
- var nodes = document.getElementsByTagName("SCRIPT");
- var l = nodes.length;
-
- foundweb: for (var i = 0; i < l; i++) {
- var attrs = nodes[i].attributes;
- for (var j = 0; j < attrs.length; j++) {
- if (attrs[j].nodeName == "src") {
- if (attrs[j].nodeValue.indexOf("?web=") > 0) {
- var web = attrs[j].nodeValue.substring(attrs[j].nodeValue.indexOf("?web=")+5, attrs[j].nodeValue.length);
- break foundweb;
- }
- break;
- }
- }
- }
-
- if (typeof web == "undefined") {
- if (typeof _F_Config != "undefined") {
- var web = _F_Config.webContent;
- }
- else if (typeof console != "undefined") {
- console.error("Unable to find web content directory. Dojo not loaded.");
- }
- }
-
-
- if (typeof web != "undefined") {
-
- djConfig = {
- parseOnLoad: true,
- baseUrl: web + "/dojo16/dojo/"
- }
-
- if (document.getElementsByTagName("head")[0] != null) {
- var head = document.getElementsByTagName("head")[0];
- var newscript= document.createElement('script');
- newscript.type = 'text/javascript';
- newscript.setAttribute("src", djConfig.baseUrl+"dojo.js");
- head.appendChild(newscript);
- }
- }
- }
|