SCRIPT5007: Unable to get value of the property 'SetReturnValue': object is null or undefined

Josh picture Josh · Sep 23, 2011 · Viewed 84.2k times · Source

I have a page that works perfectly in all other browsers but breaks in IE. The error from the debugger is:

SCRIPT5007: Unable to get value of the property 'SetReturnValue': object is null or undefined

It happens when I click a button in a flash object to call a function. None of the buttons in the flash file work in IE but all work flawlessly in the other browsers. Anyone have any ideas? I've googled and really couldn't figure it out from the answers out there.

The web address is http://capitolomaha.com/reservations/

Any help is much appreciated, this is confusing me so bad.

Answer

whoisbenli picture whoisbenli · Nov 11, 2011

See http://msdn.microsoft.com/en-us/library/gg622942%28v=VS.85%29.aspx

Basically, IE9 breaks flash ExternalInterface calls if your flash component is embedded with an object tag with an embed tag fallback, and the object id and embed name is the same.

The easiest workaround is to tell ie9 to render your page in IE8 Standards mode. To do this, insert this in the element:

<!-- Enable IE8 Standards mode -->
<meta http-equiv="X-UA-Compatible" content="IE=8" >

Otherwise, you might just want to use the object tag only or embed tag only.