AnsweredAssumed Answered

Having issue of Legend.startup() in IE8

Question asked by tonylife on Aug 23, 2013
Latest reply on Aug 23, 2013 by tonylife
When doing Legend.startup() in IE8, I am hitting an error on following function in widget.js of 3.5 API

createLegend: function() {     var _695 = false;      _672.set(this.domNode, "position", "relative");     ...... }

The problem is, this.domNode is null in IE8.

Chrome works fine, and this.domNode suppose to be "<div id="legendDiv" widgetid="legendDiv"></div>"

This div is the container of the Legend, I created it dynamically using jquery, right before creating legend.

            var legendCp = new dijit.layout.ContentPane({                 title:,                 selected: true,                 region: 'center',                 id: "legendPanel"             });              dijit.byId('stackContainer').addChild(legendCp);             dojo.addClass(dojo.byId('legendPanel'), 'panel_content');              $('#legendPanel').append('<div id="legendDiv" widgetid="legendDiv"></div>');              var legendDijit = new esri.dijit.Legend({                 map:,                 layerInfos: layerInfo             }, 'legendDiv');               if (dojo.isIE === 8 || dojo.isIE === 9) {                 setTimeout(function () {                     legendDijit.startup();                 }, 500);             } else {                 legendDijit.startup();             }

Please help on this.