Using lang="en" can break apps that use when using layout dijits and data-dojo-config(or dojoConfig) locale or extraLocale is not set. The recommended fix is to set locale or extraLocale on data-dojo-config or remove the lang="en" attribute. The specific error seen when this is an issue is "dojo/parser::parse() error TypeError" in Chrome and "TypeError: _72f(...) is undefined" in Firefox. More information is available in the Dojo bug tracker: http://trac.dojotoolkit.org/ticket/15630#comment:7 http://trac.dojotoolkit.org/ticket/15768#comment:6
I'm actually using AMD myself, but I didn't know if there was a way to keep that line in. I had to take out the language tag too.
Man- this is a blast from the past.
My memory is fuzzy about this (especially since I also upgraded this to AMD from legacy) but I think the only thing I needed to do was remove this line from my original header:
<html lang="en">
Did you just remove the lang='en' as well?
This is still an issue in 3.14.
dojo/parser:parse() error TypeError {} serverapi.arcgisonline.com/jsapi/arcgis/3.4/:34
//============================================================================= // Global declarations and dependencies //============================================================================= dojo.require("esri.graphic"); dojo.require("esri.map"); dojo.require("esri.dijit.BasemapGallery"); dojo.require("esri.dijit.InfoWindow"); dojo.require("esri.dijit.Popup"); dojo.require("esri.dijit.Scalebar"); dojo.require("esri.layers.FeatureLayer"); dojo.require("esri.layers.KMLLayer"); dojo.require("esri.tasks.query"); dojo.require("dijit.dijit"); // optimize: load dijit layer dojo.require("dijit.form.Button"); dojo.require("dijit.layout.BorderContainer"); dojo.require("dijit.layout.ContentPane"); dojo.require("dijit.Menu"); dojo.require("dojo.date.locale"); dojo.require("dojo.parser"); dojo.require("dojox.grid.DataGrid"); dojo.require("dojo.data.ItemFileReadStore"); var rdClosuresShown = 1; var trafficCamShown = 0; var streamGageShown = 0; var snowRoutesShown = 0; var iceRemovalShown = 0; var wsdotAlertsShown = 0; var rdClosureWdgt; var trafficCamWdgt; var snowRteWdgt; var icingRteWdgt; var gageWdgt; var wsdotWdgt; var map; var mapLayers = []; var popup, template; var wsdotTemplate; var theBasemap, theFeatureLayer, theCountiesLayer; var basemapGallery; var theSnowRemovalLayer, theWsdotCamLayer, theWsdotAlertLayer; var initExtent; //Update today's date on the webpage var dToday = new Date().toLocaleDateString(); var SERVERPATH = "http://..."; //============================================================================= // Main routine for initializing the Map //============================================================================= function initMap() { . . .etc }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.