Sample Viewer: how to call up a Widget on page load?

518
2
06-08-2010 10:50 AM
MostafaAsadi
New Contributor
Hi,

Is there a way to load a widget right when the page loads? I have tried a few things but I keep getting TypeError: blabla is not a constructor.

Any ideas? Thanks!
0 Kudos
2 Replies
nicogis
MVP Frequent Contributor
In widgetManager.js -> in onMapLoad

setTimeout(dojo.hitch(this, function(){
                                                                //add these two rows
    var w = this.getWidget("About"); //set label widget
    dojo.publish("showWidget", );
    
    .....
    
   }), 1000);
0 Kudos
MostafaAsadi
New Contributor
Perfect!!!! Thanks a lot!
0 Kudos