title: dojo: how to execute javascript functions of a page which is loaded by contentPane
body: <p>I have following pages:</p>
  
  <p>popup.html</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  //requires
  function doFunction(){
      alert("hi");
  }
  &lt;/script&gt;
  &lt;button dojoType="dijit.form.Button" type="button" onClick="doFunction()"&gt;Click me&lt;/button&gt;
  </code></pre>
  
  <p>main.html</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
      function showPopUp(){
          theContentPane.set("Href", "popup.html");
          theModal.show();
  
      }
      &lt;/script&gt;
          &lt;div dojoType="dijit.Dialog" jsId="theModal"&gt;
              &lt;div dojoType="dojox.layout.ContentPane" jsId="theContentPane"&gt;
  
              &lt;/div&gt;      
          &lt;/div&gt;
  &lt;button dojoType="dijit.form.Button" type="button" onClick="showPopUp()"&gt;open popup&lt;/button&gt;
  </code></pre>
  
  <p>when I press the button <code>"open popup"</code> in main.html the pop opened, and everything seems to be fine. but when I pression the button of the popup <code>"click me"</code> firebug shows: <code>doFunction is not defined</code> </p>
  
  <p>is it problem of scope? how can I make the popup.html call funciones which is inside popup.html</p>