1

I am using both IE and Firefox for testing. The Dojo addOnLoad works for both browsers BUT for Firefox, it fires before my Dojo TabContainer is initialised. For IE, it is working fine. Is there any other Dojo / Javascript / jQuery method to circumvent this problem?

Script

<script>
dojo.addOnLoad( function(){
      alert("Tabcontainer loaded");

});
</script>

TabContainer

<div dojoType="dijit.layout.TabContainer" id="TabContainer">
newtodatatables
  • 95
  • 4
  • 13

2 Answers2

0

I apologize, but I haven't used Dojo in over a year, so I've forgotten it all. Maybe try dojo.ready(), or you could try adding djconfig="parseOnLoad:true" to the <script> tag where you include the Dojo JS file. I have no idea if either of these methods will work, but it can't hurt to try :)

Edit: maybe a call to dojo.parser.parse(); in your onload handler will do the trick? (in conjunction with parseOnLoad:false?)

John Kurlak
  • 6,594
  • 7
  • 43
  • 59
0

I have fixed it! This is done by including the first jsp page using the <%@include> This will definitely initialise the TabContainer so that future tabs can be added.

newtodatatables
  • 95
  • 4
  • 13