SimonMicheal
9 Mar 2007, 8:47 AM
When I call the function ClosePopUp I get an error can anybody help?
var digPopUp;
// create the AddressDialog application (single instance)
var EditorDialog = function(){
// everything in this space is private and only accessible in the HelloWorld block
// define some private variables
var btnEditorPopUp;
// return a public interface
return {
init : function()
{
btnEditorPopUp = Ext.get('btnPopUp');
// attach to click event
btnEditorPopUp.on('click', this.showPopUp, this, true);
},
showPopUp : function()
{
if (digPopUp == null)
{
if(!digPopUp)
{ // lazy initialize the dialog and only create it once
digPopUp = new Ext.BasicDialog("PopUp_Panel", {
modal:true,
autoTabs:true,
width:390,
height:250,
shadow:true,
minWidth:220,
proxyDrag: true,
minHeight:300,
shim: true
});
}
digPopUp.el.insertBefore(document.body.firstChild);
digPopUp.show(btnEditorPopUp.dom);
}
else
{
digPopUp.show();
}
}
};
}();
function ClosePopUp()
{
digPopUp.hide();
}
var digPopUp;
// create the AddressDialog application (single instance)
var EditorDialog = function(){
// everything in this space is private and only accessible in the HelloWorld block
// define some private variables
var btnEditorPopUp;
// return a public interface
return {
init : function()
{
btnEditorPopUp = Ext.get('btnPopUp');
// attach to click event
btnEditorPopUp.on('click', this.showPopUp, this, true);
},
showPopUp : function()
{
if (digPopUp == null)
{
if(!digPopUp)
{ // lazy initialize the dialog and only create it once
digPopUp = new Ext.BasicDialog("PopUp_Panel", {
modal:true,
autoTabs:true,
width:390,
height:250,
shadow:true,
minWidth:220,
proxyDrag: true,
minHeight:300,
shim: true
});
}
digPopUp.el.insertBefore(document.body.firstChild);
digPopUp.show(btnEditorPopUp.dom);
}
else
{
digPopUp.show();
}
}
};
}();
function ClosePopUp()
{
digPopUp.hide();
}