var tc = new dijit.layout.TabContainer({ style : "width:100%;height:250px;" }, dojo.create('div')); forEach(myData,function(data){ var cp1 = new dijit.layout.ContentPane({ title: "A title"}); cp1.setContent(layerTabContent(data)); // create an html table from data for tab content tc.addChild(cp1); });
template.setContent(tc.domNode); graphic.setInfoTemplate(template);
var html = '<div><table><tr><td><img src="icon.png"></td>'; html += '<td><span>' + feature.attributes["Address"] + '</span><br/>'; html += '</td></tr></table></div>';
template.setContent(html); graphic.setInfoTemplate(template);
Solved! Go to Solution.
var bc = new dijit.layout.BorderContainer({ style: "height: 220px; width: 310px;overflow:hidden;" }); var cp1 = new dijit.layout.ContentPane({ region: "top", content: <HTML_STRING> }); bc.addChild(cp1); //tc is your tab container var cp2 = new dijit.layout.ContentPane({ region: "center", content: tc.domNode }); bc.addChild(cp2); tc.startup(); bc.startup(); this.map.infoWindow.setContent(bc.domNode); this.map.infoWindow.onShow = null; //var bc = this.resultBorderContainer; dojo.connect(this.map.infoWindow, "onShow", function () { if (tc != undefined && bc != null) { bc.resize(); tc.resize(); } });
var bc = new dijit.layout.BorderContainer({ style: "height: 220px; width: 310px;overflow:hidden;" }); var cp1 = new dijit.layout.ContentPane({ region: "top", content: <HTML_STRING> }); bc.addChild(cp1); //tc is your tab container var cp2 = new dijit.layout.ContentPane({ region: "center", content: tc.domNode }); bc.addChild(cp2); tc.startup(); bc.startup(); this.map.infoWindow.setContent(bc.domNode); this.map.infoWindow.onShow = null; //var bc = this.resultBorderContainer; dojo.connect(this.map.infoWindow, "onShow", function () { if (tc != undefined && bc != null) { bc.resize(); tc.resize(); } });