Login Register

addonload

SOLVED: Fix for dojo.addOnLoad with IE (Dojo 1.1)

Hello,

I've recently bumped into a dojo.addOnLoad bug with IE6: It can execute the passed function even if document's readystate is currently "loading".

Here's a way to patch dojo.addOnLoad:

    //dojo.addOnLoad patch if IE
    if(dojo.isIE){
        //Saving a copy of the original function.
        var origAddOnLoad=dojo.addOnLoad;
        //Wrapping it.
        dojo.addOnLoad=function(){
            var args=arguments;
            if(document.readyState=="complete"){

HOWTO: a nice way to load dojo pages in a TabContainer

we want few words and more code...

index.html

index

 

dojo.require("dojox.layout.ContentPane");
dojo.require("dijit.layout.TabContainer");

problem with dojo.addOnLoad on IE7

Hello

I tried do call dojo.addOnLoad (dojo1.0) in a custom object file, to create a single instance of the object :

if(!dojo._hasResource["webshop.utils.Portability"]){ 
dojo._hasResource["webshop.utils.Portability"] = true;
dojo.provide("webshop.utils.Portability");


dojo.declare("webshop.utils.Portability",null , {
    getNodeContent : function (node){
        .....
  }

});

function init(){
alert('init function running')
portability=new webshop.utils.Portability();
}
dojo.addOnLoad(init);

}

;

Syndicate content