views:

306

answers:

1

I'm using the classical JavaScript way (programatically) to instantiate dijit widgets with dojo-1.3.1, it works OK in Firefox but in IE wont initialize the widgets and it doesn't throw any error.

My source code for this is:

<html>
<head>
  <title>...</title>
  <script type="text/javascript" src="lib/dojo/dojo/dojo.js" djconfig="parseOnLoad:true, isDebug: true"></script>
  <script>
  dojo.require("dijit.form.DropDownButton");
  dojo.require("dijit.Dialog");
  dojo.require("dijit.form.Button");
  dojo.addOnLoad(function(){
     var addFormTooltip = new dijit.TooltipDialog({
         title: "Add a new person",
         execute: function(arguments){
             console.debug("Add \"New Person\" Form Tooltip Execute."); 
         }
     }, "add_form_tooltip");

     var tooltipOkButton = new dijit.form.Button({
         name: "ok",
         type: "submit"
     }, "tooltip_ok_button");

     var addDropDownButton = new dijit.form.DropDownButton({
          title: "Add new person",
          label: "Add",
          dropDown: addFormTooltip // refers to addFormTooltip variable
     },"add_button");
  });

 </script>
</head>
<body>
  <div id="add_button"></div>
  <div style="display:none">
     <div id="add_form_tooltip">
      <!-- Tooltip content -->
      <span>Hello world</span>
      <button id="tooltip_ok_button">OK</button>
     </div>
  </div>
</body>
</html>

Did I miss something?

I tried the descriptive method and it works on both Browsers, so it must be something with this code or with my IE browser I think.

A: 

I don't know if it is the issue but, you should call the widgets startup method if you are creating them programmaticly. I do not see that you are doing that.

kls