Friday, January 9, 2009
Internet Explorer + Ext.Window = Fail?
Ext.onReady(function() {
var win;
if(!win){
win = new Ext.Window({
el:'content-win',
closable: false,
collapsible: false,
resizable: false,
renderTo: 'content',
layout:'fit',
width:650,
height:300,
closeAction:'hide',
plain: true,
buttons: [{
text: 'Default position',
handler: function(){
windowdefault(win, null);
}
}],
items: new Ext.TabPanel({
el: 'main-tabs',
autoTabs:true,
activeTab:0,
deferredRender:false,
border:false
})
});
}
win.setPosition(15, 25);
win.show(this);
var login;
if(!login){
login = new Ext.Window({
el:'login',
closable: false,
collapsible: true,
resizable: false,
renderTo: 'content',
layout:'fit',
width:200,
height:250,
closeAction:'hide',
plain: true,
buttons: [{
text: 'Default position',
handler: function(){
windowdefault(null, login);
}
}],
items: new Ext.TabPanel({
el: 'login-tabs',
autoTabs:true,
activeTab:0,
deferredRender:false,
border:false
})
});
}
login.setPosition(700, 25);
login.show(this);
And my code for the HTML is:
Fuzzbox
Heres the code before I removed the button control:
Ext.onReady(function(){
var win;
var button = Ext.get('show-btn');
button.on('click', function(){
// create the window on the first click and reuse on subsequent clicks
if(!win){
win = new Ext.Window({
el:'hello-win',
layout:'fit',
width:500,
height:300,
closeAction:'hide',
plain: true,
items: new Ext.TabPanel({
el: 'hello-tabs',
autoTabs:true,
activeTab:0,
deferredRender:false,
border:false
}),
buttons: [{
text:'Submit',
disabled:true
},{
text: 'Close',
handler: function(){
win.hide();
}
}]
});
}
win.show(this);
});
});
And here is it after I removed the buttons control:
Ext.onReady(function(){
var win;
var button = Ext.get('show-btn');
if(!win){
win = new Ext.Window({
el:'hello-win',
layout:'fit',
width:500,
height:300,
closeAction:'hide',
plain: true,
items: new Ext.TabPanel({
el: 'hello-tabs',
autoTabs:true,
activeTab:0,
deferredRender:false,
border:false
}),
buttons: [{
text:'Submit',
disabled:true
},{
text: 'Close',
handler: function(){
win.hide();
}
}]
});
}
win.show(this);
});
The error I get in IE is 'Style is null or not an object'
#If you have any other info about this subject , Please add it free.# |