title: Using old Dojo 0.9 in new Sharepoint 2013
body: <p>I have a Web-Application using old Dojo Framework 0.9.
  Migrating to a new Dojo would be very time-consuming.</p>
  
  <p>In a simple iFrame my web-application is running.
  But when I start it in a Sharepoint2013 Webpart, dojo doesn't seem to "initialize" properly.</p>
  
  <p>In main.aspx I use some div-Containers as Node for Main-Window, Pop-Up etc.
  When the the login-popup should be displayed, the node is not found in PopupContainer.js using Manager.js</p>
  
  <p>Is there a cross-domain-problem or do I have to configure Sharepoint2013...</p>
  
  <p>Thanks in Advance.</p>
  
  <h1>Code Snippets:</h1>
  
  <h2>main.aspx</h2>
  
  <pre><code>&lt;script type="text/javascript" language="javascript" src="js/dojo.js"&gt;&lt;/script&gt;
  
      &lt;script language="javascript" type="text/javascript"&gt;
  ...  
          dojo.require("dojo.widget.ContentPane");  
          dojo.require("dojo.widget.SplitContainer")  
          dojo.require("dojo.widget.LayoutContainer");  
          dojo.require("dojo.widget.HtmlWidget");  
          dojo.require("dojo.widget.Dialog");  
          dojo.require("dojo.widget.Menu2");  
          dojo.require("dojo.widget.Tooltip");  
          dojo.require("dojo.widget.Button");  
          dojo.require("dojo.widget.FloatingPane");  
          dojo.require("dojo.widget.CWComboBox");  
          dojo.require("dojo.widget.ComboBox");  
          dojo.require("dojo.widget.PopupContainer");  
          ...  
          dojo.hostenv.writeIncludes();  
  ...  
  
  &lt;body id="content"&gt;  
  
          &lt;% Process(); %&gt;    
          &lt;div dojoType="ContentPane" visible=false isLoaded=true  dojoAttachPoint='containerNode' widgetId="MenuPane" label="Empty" style="width:0px; height:0px; overflow:hidden;" executeScripts=true cacheContent=false&gt;
          &lt;/div&gt;  
          &lt;!-- Dummy Pane for popup containers --&gt;  
          &lt;div dojoType="ContentPane" visible=false isLoaded=true dojoAttachPoint='containerNode' widgetId="PopupContainerPane" label="Empty" style="width:300px; height:300px; overflow:hidden;" executeScripts=true cacheContent=false&gt;
          &lt;/div&gt;  
          &lt;!-- Dummy Pane for Dynamic Dialogs --&gt;  
          &lt;div dojoType="ContentPane" visible=false isLoaded=true dojoAttachPoint='containerNode' widgetId="DialogPane" label="Empty" style="width:0px; height:0px; overflow:hidden;" executeScripts=true cacheContent=false&gt;
          &lt;/div&gt;  
          &lt;!-- MainPane --&gt;  
          &lt;div dojoType="CWContentPane" isLoaded=true id="w_1" widgetId="w_1" label="Empty" style="width:100%; height:100%; overflow:hidden;" executeScripts=true cacheContent=false adjustPaths=false parseContent=true scriptSeparation=false&gt;
          &lt;/div&gt;  
      &lt;/body&gt;
  </code></pre>
  
  <p>...  </p>
  
  <h2>Dialog.js</h2>
  
  <p>...<br>
  <em>cDialogPane remains undefined, because widget _strDialogPane is not found in Manager.js</em></p>
  
  <pre><code>var cDialogPane = dojo.widget.manager.getWidgetById(_strDialogPane);
      if (null == cDialogPane) {
          alert('dojo.dialog.loadDialog: null == DialogPane');
          window.location.replace(dojo.session.getErrorPage());
      }
  </code></pre>
  
  <h2>Manager.js</h2>
  
  <p><em>id is undefined, because widgetIds-Array is empty, but at least should be filled with the divs defined in main.aspx</em></p>
  
  <pre><code>... 
      this.getWidgetById = function(id){  
              if(dojo.lang.isString(id)){  
                  return this.widgetIds[id];  
              }  
              return id;  
          }  
  ...
  </code></pre>