View Full Version : IE 8 Msg problem

16 Aug 2009, 6:03 AM
Hi, I tried searching all over, but can't find this particular problem. (and yes, i'm new to extjs). All others browsers look fine.

This is what I see in ie8 when I use a Msg.alert object:


here it is (correctly) in ff:


here is my code:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>EXTJS Test Area</title>
<link rel="stylesheet" type="text/css" href="/CFIDE/scripts/ext-3.0.0/resources/css/ext-all.css" />
<script src="/CFIDE/scripts/ext-3.0.0/adapter/ext/ext-base.js"></script>
<script src="/CFIDE/scripts/ext-3.0.0/ext-all-debug.js"></script>


title: 'Milton',
msg: 'Have you seen my stapler?',
buttons: {
yes: true,
no: true,
cancel: true





What am I missing??


16 Aug 2009, 1:06 PM
try this
Taken from the API

title:'Save Changes?',
msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?',
buttons: Ext.Msg.YESNOCANCEL,// as specified in the API
fn: processResult,
animEl: 'elId',
icon: Ext.MessageBox.QUESTION

Replace the button object with the buttons property

16 Aug 2009, 1:39 PM
Its not a 'property', that's a constant that Ext defines, and it is simply set to the value below, which is what madirishman essentially has:


I would start by changing the slashes in your blank image url to the appropriate slashes and did you notice that you have a hyphen in 's.gif' instead of a dot?



See how that works to start with. I don't see anything else wrong with your code - looks great.

16 Aug 2009, 3:38 PM
Thanks for both of the responses. I corrected the image link and that didn't help - but this did: I just added something between the body tags (I put an empty div in there) and presto - success!

It must have been something to do with having nothing in the body of the document.

My confidence is now restored - I'm going to continue learning... this is fun stuff!


16 Aug 2009, 3:56 PM
Good job, glad you found the problem.

Also, make sure you get the eratta list from the publisher site along with the updated code from the link in my signature.

16 Aug 2009, 4:53 PM
Sounds good. Thanks!

p.s. any idea why adding content to the body would make a difference?

16 Aug 2009, 5:55 PM
Its just another one of those funky IE things, im not sure about the technical details why, but many people just add an empty div to the body.

17 Aug 2009, 12:35 AM

So can you pass in a config with your buttons property set to an object like this:

{"ok":true,"cancel":true}for the MessageBox's show method? Could not see this in the API?
The other approach then is to specify a constant such as?

17 Aug 2009, 5:32 AM
So can you pass in a config with your buttons property set to an object like this:

{"ok":true,"cancel":true}for the MessageBox's show method? Could not see this in the API?
The documentation gives an example of this if you expand the 'show' method...

# buttons : Object/Boolean
A button config object (e.g., Ext.MessageBox.OKCANCEL or {ok:'Foo', cancel:'Bar'}), or false to not show any buttons (defaults to false)

The other approach then is to specify a constant...
Yes, and the constant just contains that same object anyway. The constant is just a shortcut so to speak.

17 Aug 2009, 7:28 AM
Nice one. Thanks