Note that there are some explanatory texts on larger screens.

plurals
  1. PODojo.. cannot execute javascript in contentpane
    text
    copied!<p>I have a standalone html page that contains a dojo DataGrid that works just fine. I am including the relevant code below.</p> <hr> <pre><code> &lt;script type="text/javascript"&gt; var readStore, grid; var gridLayout = [ new dojox.grid.cells.RowIndex({ name: "Row #", width: 5, styles: "text-align: left;" }), { name: "Name", field: "name", styles: "text-align:right;", width:30 }, { name: "Type", field: "type", width:20 } ]; function initGrid() { readStore=new dojox.data.QueryReadStore({url:"/EG3/orgUnit/getChildren", requestMethod:"get"}); console.info("readStore initialized"); grid=new dojox.grid.DataGrid({store:readStore, id:"grid", delayScroll:true, structure:gridLayout, query:{id:2}, loadingMessage:"Loading..." }, document.createElement('div')); dojo.byId("gridContainer").appendChild(grid.domNode); grid.startup(); } dojo.addOnLoad(initGrid); &lt;/script&gt; &lt;/HEAD&gt; &lt;BODY class="claro"&gt; &lt;div id="list" class="list"&gt; Table goes here &lt;div id="gridContainer"&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>Now, the problem happens when I try to include this page as a contentpane within a TabContainer. The TabContainer loads the page markup as is and does not fire the onLoad script of the page that contains the grid.</p> <pre><code> &lt;div dojoType="dijit.layout.TabContainer" region="center" tabStrip="true" id="orgUnitTabs"&gt; &lt;div dojoType="dojox.layout.ContentPane" title="Info" selected="true" id="orgInfo" jsId="orgInfo"&gt; &lt;/div&gt; &lt;div dojoType="dojox.layout.ContentPane" href="/EG3/app/orgUnit/orgUnitChildren.gsp" executeScripts="true" parseOnLoad="true" extractContent="true" title="Children" id="children" jsId="children"&gt; Children of the selected Org &lt;script type="javascript" event="onLoad"&gt; initGrid(); &lt;/script&gt; &lt;/div&gt; </code></pre> <p>Any ideas on how the onLoad script of the child page can be fired?</p> <p>Thanks in advance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload