IE error : “Invalid Property Value”

IE invalid Property Value Exception

IE Errors

I got this “invalid property value” error every time I clicked on the tab that
had an Ajax call. Exception was coming from line 1932 character 8.

My first thought was that it is some styling issue and it had something to do with css float property.

While researching I found this quick fix. I decided to share it with you guys. Check out Tim’s post for more information.
I made the changed and the error is gone.

Thanks to Tim.

setStyle: function(element, styles) {
element = $(element); var elementStyle =, match; if (Object.isString(styles)) { += ‘;’ + styles;
return styles.include(‘opacity’) ?
)/)[1]) : element;

} for (var property in styles)

if (property == ‘opacity’) {

//CHANGED CODE *************************
else if (Prototype.Browser.IE && property ==
‘backgroundColor’) {
elementStyle[property] = styles[property];

elementStyle[(property == ‘float’ || property == ‘cssFloat’) ?
(Object.isUndefined(elementStyle.styleFloat) ? ‘cssFloat’ : ‘styleFloat’) :
property] = styles[property];

return element; },

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s