PDA

View Full Version : ExtJS doesn't work in IE



lszk
9 Aug 2009, 1:26 AM
Hi all.
This is my first time with ExtJS. This code

Ext.onReady(function(){ Ext.Msg.alert("Hello", "world"); });

works properly in Firefox, Opera and Chrome, but not in IE. In IE (8) I have only blank page. Can somebody tell me why?

Animal
9 Aug 2009, 3:36 AM
There must be something else on the page that's blowing it up.

This is what debuggers are for.

Check for any javascript errors from elsewhere. Specifically, errors caused by trailing commas.

lszk
10 Aug 2009, 9:48 AM
Ok I found what was wrong.
But now, the result in IE looks that:
http://img233.imageshack.us/i/86074332.png/

In other browsers it looks fine, apart from the fact that the buttons are too big:
http://img200.imageshack.us/i/otherb.png/

I found the Ext.BLANK_IMAGE_URL, so I set it before the Ext.onReady function
Ext.BLANK_IMAGE_URL = './lib/ext/resources/images/default/s.gif';
but it doesn't work. Buttons are still big.

Animal
10 Aug 2009, 9:59 AM
Well you're going to have to show code.

Buttons can't be any size you want. They have three scales

Have you just upgraded to Ext 3.0 without also pulling in the 3.0 CSS files and images? They all changed too.

lszk
10 Aug 2009, 10:28 AM
I forgot I showed result from other example that in my first post, however in first post the button in result looks like on the screens I showed.

My code:


<head><link rel="stylesheet" type="text/css" href="lib/ext/resources/css/ext-all.css" />
<script type="text/javascript" src="lib/ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="lib/ext/ext-all.js"></script>
<script type="text/javascript" src="lib/ext/ext-all-debug.js"></script>
<script type="text/javascript">
Ext.BLANK_IMAGE_URL = './lib/ext/resources/images/default/s.gif';
Ext.onReady(function(){
Ext.Msg.show({
title: 'title',
msg: 'message',
buttons: {
yes: true,
no: true,
cancel: true
}
});
});
</script></head>
I replaced the Ext2.2 to 3.0 in Aptana. I'll check to see if I didn't leave sth.

[edit]
Ok. I've got it too. I had also included my own css file. It was its fault.