PDA

View Full Version : Ext.Window from HTML gives error: el is null(ext-all-debug.js line 15938)



ypandey
8 Mar 2012, 8:37 PM
Hi All,

Version: Ext 4.0.7


I am trying to open Ext.Window from HTML but getting following error.
error: el is null
ext-all-debug.js(line 15938)


Following is the code:


MainFrame.html


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Main Window</title>
<link rel="stylesheet" type="text/css" href="<Path>/css/resources/css/ext-all.css">
<script type="text/javascript" src="<Path>/extJS/ext-all-debug.js"></script>
<script type="text/javascript" >
Ext.onReady(function() {
var w = new Ext.Window({
width:640,
height:480,
title:"Popup Window",
src:"someurl"
})
w.show();
});
</script>

</head>




<frameset cols="75%,25%">
<frame src="frame1.html" />
<frameset rows="25%,75%">
<frame src="frame2.html" />
<frame src="frame3.html" />
</frameset>
</frameset>




</html>



frame1.html


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Frame 1</title>
</head>
<body>
<B>Frame 1<B>
</body>
</html>



frame2.html


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Frame 2.1</title>
</head>
<body>
<B>Frame 2.1<B>
</body>
</html>







frame3.html


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Frame 2.2</title>
</head>
<body>
<B>Frame 2.2<B>
</body>
</html>







Here if i try to open Ext.Window from frame1.html then it opens but maximum window size will be the size of frame1 viewport. Our requirement is to open the Ext.Window having size of browser viewport.
So i tried to open Ext.Window from MainFrame.html but MainFrame.html gives following error:
error: el is null
ext-all-debug.js(line 15938)


Am i missing anything here?


Is there any otherway to open Ext.Window having size of browser viewport from html frame.




Thanks,
Rab

mitchellsimoens
9 Mar 2012, 8:21 AM
You are trying to show a window on a page that doesn't have a body.

ypandey
9 Mar 2012, 9:46 PM
Thanks for reply

I was trying to open Ext.Window from HTML page having frameset so that i can maximize Ext.Window to vieport size. As HTML page does not have body Ext.Window is not coming up.

Thanks,
Rab