PDA

View Full Version : ext js 3.4 render to sub iframe



ashkfuaraz
16 Mar 2017, 9:12 AM
Html


<html>
<head> <script src="extjs.js" /> </head>
<body>
<iframe id="myframe"> <div id="tree</div> <script> var tree = new parent.Ext.ux.tree.TreeGrid({ renderTo: "myframe#tree" columns: [{ header: 'Task', dataIndex: 'task', width: 230 }], dataUrl: 'data.php' }); </script> </iframe> </body>
</html>


I want create tree Grid and render to iframe.
But `renderTo: "myframe#tree"` say error `Cannot read property 'dom' of null`


I want user Ext js in `myframe` without load `extjs.js` again.how can use ext js parent from iframe?

Gary Schlosberg
16 Mar 2017, 9:24 AM
I don't see how the iframe would be able to get access to the parent. What is the use case?

ashkfuaraz
18 Mar 2017, 1:09 AM
excuse me
i update my code



<html>
<head> <script src="extjs.js" /> </head>
<body>
<iframe id="myframe"> <div id="tree</div> <script> var tree = new parent.Ext.ux.tree.TreeGrid({ renderTo: "myframe#tree" columns: [{ header: 'Task', dataIndex: 'task', width: 230 }], dataUrl: 'data.php' }); </script> </iframe> </body>
</html>