I have a page that uses several dijit form widgets. I also have an iframe on each side of my form that display various ads.
I noticed that certain ads take a while to load and that my dijit widgets do not render until the page is ready because my code is like this:
<script type="text/javascript">
dojo.require("dijit.dijit");
dojo.require("dojo.parser");
dojo.require("dijit.form.Form");
dojo.require("dijit.TitlePane");
dojo.require("dijit.form.Button");
dojo.require("dijit.form.ValidationTextBox");
dojo.require("dijit.form.CheckBox");
dojo.require("dijit.form.RadioButton");
dojo.require("dijit.form.DateTextBox");
dojo.require("dijit.form.FilteringSelect");
dojo.require("dijit.Tooltip");
dojo.addOnLoad(function() {
dojo.addOnLoad(myFunction);
});
Is there a way I can make my dijit widgets that are on my form render first and then the ads display after? I know I can probably use ajax to get the ads after the page is ready but I was wondering if there was a different solution?
Thanks
I ended up using dojo.xhrGet to get my ads after the page loaded like this:
Inside getAds() it just does a simple xhrGet.