AnsweredAssumed Answered

'dojo' is undefined

Question asked by jbailey.spatialbridge on Feb 14, 2013
Latest reply on Mar 7, 2013 by jbailey.spatialbridge

Having a problem configuring the ArcGIS Server Javascript API. I've downloaded v3.3 from, and followed the installation instructions. Since the target server does not have Internet access, I've changed the configuration to point to the Javascript API that I installed on the local server, following the directions in the REST API SDK help.

I've set up several services that are running, and I can view them in ArcMap and in ArcCatalog. However, when trying to view the services from ArcGIS Manager, the map does not appear, and the error ''dojo' is undefined' is thrown.

I think that the problem might be with how the URLs are being constructed in the output. Here are the contents of the file that I modified according to the REST API SDK instructions:

#The log level of the application #possible values: SEVERE,WARNING,INFO,CONFIG,FINE,FINER,FINEST,OFF,ALL logLevel=SEVERE #enable/disable console logging consoleLogging=false #Collection of allowed cross-domain origins, If this property is not specified, it will default to allowing access to all domains allowedOrigins=* #Client App properties #JS API URLs jsapi.arcgis= #jsapi.arcgis.sdk= jsapi.arcgis.css= URLs Map

but looking at the HTML output when I try to preview the Sample World Cities, the URLs have changed:

[HTML]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>ArcGIS JavaScript API: SampleWorldCities</title>
<style type="text/css"> @import "";
@import "/arcgis/rest/static/jsapi.css";
</style> <script type="text/javascript"> var djConfig = { parseOnLoad: true };
</script> <script type="text/javascript" src=""> </script> <script type="text/javascript"> dojo.require("dijit.layout.BorderContainer");
var map;
function init() {
    map = new esri.Map("map");
          var layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://localhost:6080/arcgis/rest/services/SampleWorldCities/MapServer");
    var resizeTimer;
    dojo.connect(map, 'onLoad', function(theMap) {
      dojo.connect(dijit.byId('map'), 'resize', function() {
        resizeTimer = setTimeout(function() {
         }, 500);
</script> </head> <body class="tundra"> <div dojotype="dijit.layout.BorderContainer" design="headline" gutters="true" style="width: 100%; height: 100%; margin: 0;"> <div dojotype="dijit.layout.ContentPane" region="top" id="navtable"> <div style="float:left;" id="breadcrumbs">ArcGIS JavaScript API: SampleWorldCities</div> <div style="float:right;" id="help">
Built using the <a href="">ArcGIS JavaScript API</a>
</div> </div> <div id="map" dojotype="dijit.layout.ContentPane" region="center"> </div> </div> </body>

Any ideas on what I should look at to fix my configuration?