View Full Version : Button html property not working in IE?

4 Feb 2010, 7:33 PM
Hi all,

I came across a problem that I have not seen in the forum..but someone must have come across it before.

I am rendering a button with an html property..and it works fine in Firefox but not in IE (tried on ie6 and ie7).

Am I doing something wrong, or is this a problem with IE?

var testButton = {
style: {
margin: '5px 5px 5px 5px'
width: 90,
html: "<img src='./images/accessories-dictionary.png'>",

This button is being added to the items list of a panel.

I have also tried replacing the html with a simple string such as "abc". Again, renders fine in Firefox but not in IE.

Any suggestions?

Thanks in advance!

4 Feb 2010, 8:58 PM
The only solution I have come up with is the following, which I am not happy with....

if (Ext.isIE) //This works in IE and IE only!!!!!!!!!!!
Ext.apply(testButton, {text:"<img src='./images/accessories-dictionary.png'>"});
else //This works in everything else!!!!!!!!!!!!! I.E. SUCKS!
Ext.apply(testButton, {html:"<img src='./images/accessories-dictionary.png'>"});

If anyone knows a better fix, please let me know!!!!