PDA

View Full Version : Ext Button can not work within HTML Frame Page not Iframe in IE7.0



jackgray
24 Jun 2011, 12:13 AM
See my picture. 26728
THere is a html Frame not iFrame.
When I click the 'Load' button there is no respone In IE.
However when I run this in a separate page without a HTML Frame, it works.
This situation only happens in IE and it works very well in FF. Help, thanks so much.

jackgray
24 Jun 2011, 3:39 AM
Somebody helps me ???

skirtle
24 Jun 2011, 6:21 AM
Which versions of IE have you tried?

Have you tried stepping through the problem in a debugger?

You haven't told us what the load button is supposed to do, nor have you posted any code. That doesn't give us much to go on.

jackgray
24 Jun 2011, 6:56 AM
IE7.0
When I click the load button then it will popup a new window to do something, but now there is no response.
I think it is due to the HTML frame. Here is the code as bellow:

MSOG.ClosureCodes.Main = Ext.extend(Ext.Window, {
evtOK: '',
type:'',
codeID:'',
paths:'',
isNew:null,
pathArray: new Array(),

initComponent:function()
{
var divEl1 = document.createElement('div');
divEl1.id = 'mainOneTree-div';
var divEl2 = document.createElement('div');
divEl2.id = 'mainTwoTree-div';
document.body.appendChild(divEl1);
document.body.appendChild(divEl2);
var mainOneList = new MSOG.ClosureCodes.MainOneList({applyTo: 'mainOneTree-div'});
var mainTwoList = new MSOG.ClosureCodes.MainTwoList({applyTo: 'mainTwoTree-div'});

var menubar = [{
disabled: true,
id: 'btnLoad',
text: 'Load',
tooltip: 'Load Closure Codes',
iconCls: 'db-refresh',
handler: function() {
new MSOG.ClosureCodes.Load();
loadingMsg = Ext.MessageBox.show({
msg: 'Loading, please wait...',
progressText: 'Loading...',
width:300,
wait:true,
waitConfig: {interval:200},
animEl: 'mb7'
});
}
},'-'];

var tab = new Ext.TabPanel({
activeTab: 0,
plain:true,
defaults:{autoScroll: true},
items:[mainOneList, mainTwoList]
});

tab.on({
afterrender: function() {
tab.getItem('mainOneTree').setTitle('ServiceCall Tickets');
tab.getItem('mainTwoTree').setTitle('Incident Tickets');
},
tabchange: function(n) {
if(n.getActiveTab().id == 'mainOneTree') {
ticketsCat = vScClo;
hcId = oneHcId;
} else if(n.getActiveTab().id == 'mainTwoTree'){
ticketsCat = vIncClo;
hcId = twoHcId;
}
}
})
var config = {
title: mainTitle,
maximizable: false,
closable: false,
layout:'fit',
buttonAlign : 'center',
modal: true,
tbar: menubar,
items: [tab]
};

//apply config
Ext.apply(this, Ext.apply(this.initialConfig, config));

// call parent
MSOG.ClosureCodes.Main.superclass.initComponent.apply(this, arguments);

this.on({
afterrender: function() {
Ext.Ajax.request({
url: 'json/msogClosureCodes_checkPermission.action',
success: function (result,request) {
var obj = Ext.util.JSON.decode(result.responseText);
Ext.getCmp('btnLoad').setDisabled(!obj.upd);
},
scope: this
});
}
});

}//initComponent
});//MSOG.ClosureCodes.Main

jackgray
24 Jun 2011, 7:04 AM
This is the load button scripts as bellow:

var menubar = [{
disabled: true,
id: 'btnLoad',
text: 'Load',
tooltip: 'Load Closure Codes',
iconCls: 'db-refresh',
handler: function() {
new MSOG.ClosureCodes.Load();
loadingMsg = Ext.MessageBox.show({
msg: 'Loading, please wait...',
progressText: 'Loading...',
width:300,
wait:true,
waitConfig: {interval:200},
animEl: 'mb7'
});
}
},'-'];

jackgray
24 Jun 2011, 8:02 AM
I found that when I moved mouse over this load button and clicked space key then there was a respone with the load button, it is so weird

jackgray
24 Jun 2011, 8:37 AM
Thanks everybody anyway.
I have found the root cause it is because of this
'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">'
after I remove this from JSP then it works.