PDA

View Full Version : Ext.Window getting error when



tameshwar
15 Jun 2010, 4:39 AM
var first = null;
var second = null;
function intCertifyDemoHtml()
{
if (first == null)
{
first = getInnerHTML("innerhtmlId");
setInnerHTML("innerhtmlId", "");
}
}

function callThePage(name)
{
alert("Call ");
if (second == undefined || second == null)
{
alert("first " + first);
first = "" + first;
second = new Ext.Window({
id:'myWindow',
layout:'fit',
closeAction: 'hide',
closable:false,
plain: true,
draggable:false,
resizable:false,
modal: true,
baseCls:'myClass',
shadow:false,
renderTo:'renderPanel',
html: first
});
second.show();
}
}

/* above i have mentioned the code */
there is no issues in the code. it has run fine in first time when page loaded, when i wanted to use this function second it has unable to show the model window.

getting error : el is null or el is not defined in ext-all.js

16 Jun 2010, 11:01 AM
Please post your code in code tags in teh future.

16 Jun 2010, 11:02 AM
you don't need renderTo with windows.

tameshwar
16 Jun 2010, 8:59 PM
thanks jgarcia.
i have done as you said. but its nothing happened.

Below is my full code.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
var first = null;
var second = null;
Ext.onReady(function()
{
intCertifyDemoHtml();
});

function getInnerHTML(elementId){
var innerHTML = '';
try {
innerHTML = document.getElementById(elementId).innerHTML;
}
catch (error){
//alert(error.description);
}
return innerHTML;
}

function setInnerHTML(elementId, INNER_HTML_VAL){
try {
document.getElementById(elementId).innerHTML = INNER_HTML_VAL;
}
catch (error) {
//alert(error.description);
}

}

function intCertifyDemoHtml(){
if (first == null){
first = getInnerHTML("innerhtmlId");
setInnerHTML("innerhtmlId", "");
}
}

function callThePage(name){
alert("Call ");
if (second == undefined || second == null){
alert("first " + first);
first = "" + first;
second = new Ext.Window({
id:'myWindow',
layout:'fit',
closeAction: 'hide',
closable:false,
plain: true,
draggable:false,
resizable:false,
modal: true,
baseCls:'myClass',
shadow:false,
renderTo:'renderPanel',
html: first
});
second.show();
}
}
</script>
</head>

<body>
<div id="innerhtmlId" style="display:none;"> Click to Show window panel.......
<div class="PanDivFlexible"> <span>
<input type="button" value="Certify" id="certifyReturn" onclick="certifyPan();" />
</span> </div>
</div>
</body>
</html>

fay
17 Jun 2010, 12:59 AM
I think you need to re-read Jay's posts: you're still not using CODE tags, and... you're still using renderTo!


Below is my full code.

... and just out of interest, where are you including a reference to ext-all[-debug].js??