PDA

View Full Version : Ext.Window not working in IE7



BowlingX
21 Feb 2008, 11:39 AM
Hi,
why is the following source-code not working in IE but Firefox? I've got the (part.) source from an ext Demo App: http://extjs.com/deploy/dev/examples/window/layout.html


/*
* Ext JS Library 2.0.1
* Copyright(c) 2006-2008, Ext JS, LLC.
* [email protected]
*
* http://extjs.com/license
*/

Ext.onReady(function(){

// tabs for the center
var tabs = new Ext.TabPanel({
region: 'center',
margins:'3 3 3 0',
activeTab: 0,
defaults:{autoScroll:true},

items:[{
title: 'Bogus Tab',
html: ''
},{
title: 'Another Tab',
html: ''
},{
title: 'Closable Tab',
html: '',
closable:true
}]
});

// Panel for the west
var nav = new Ext.Panel({
title: 'Navigation',
region: 'west',
split: true,
width: 200,
collapsible: true,
margins:'3 0 3 3',
cmargins:'3 3 3 3'
});

var win = new Ext.Window({
title: 'Layout Window',
closable:true,
width:600,
height:350,
//border:false,
plain:true,
layout: 'border',

items: [nav, tabs]
});

win.show(this);
});


I'am using EXT 2.0.1 and IE just shows an Error on Line 14 ('style' is null or no Object)
in ext-all.js:


if(v=el.style[camel]){return v}if(cs=el.currentStyle){return cs[camel]}return null}}.....

Thanks,
David

mabello
21 Feb 2008, 12:57 PM
Try to use win.show(), without this and clean the cache of IE of course ( I always need to remember this) :">


Ext.onReady(function(){

// tabs for the center
var tabs = new Ext.TabPanel({
region: 'center',
margins:'3 3 3 0',
activeTab: 0,
defaults:{autoScroll:true},

items:[{
title: 'Bogus Tab',
html: ''
},{
title: 'Another Tab',
html: ''
},{
title: 'Closable Tab',
html: '',
closable:true
}]
});

// Panel for the west
var nav = new Ext.Panel({
title: 'Navigation',
region: 'west',
split: true,
width: 200,
collapsible: true,
margins:'3 0 3 3',
cmargins:'3 3 3 3'
});

var win = new Ext.Window({
title: 'Layout Window',
closable:true,
width:600,
height:350,
//border:false,
plain:true,
layout: 'border',
items: [nav, tabs]
});

win.show();
});

In this case, I think that win(this) is not useful, check the documentation of the method show

BowlingX
21 Feb 2008, 1:36 PM
Hey, thanks, that solves the problem!!
David