map.addLayer(statesLyr); dojo.connect(map,'onLayersAddResult',function(results){ //add the legend var legend = new esri.dijit.Legend({ map:map, layerInfos:legendLayers, },"legendDiv"); legend.startup(); });
If you're using Aptana, try enabling JSLint validation. It will help you track down a lot of simple issues like that.
Too se errors in IE8:
F12 --> open developer tools
click con Script and then console
In the console you will read the error indicated by bdaigle
Davide
Object doesn't support this property or methodfor,
gpint = dojo.byId("gpTool");
ddMxd = dijit.byId('ddMxd');