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

84,337

Solution 1

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.

Solution 2

Much of the time, this can be caused because of an embedded object swf video player (for example: JW Player etc.)

Internet Explorer seems to require two attributes for the OBJECT tag, namely classid AND id

For a SWF player use:

classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"

id="dummy"

NB - in principle, id can be any (non-taken) dummy string

Other good sources on how to embed video:

http://www.w3schools.com/html/html_object.asp

http://www.2webvideo.com/blog/embed-swf-flv-mp4-videos-in-webpage

Solution 3

Make sure you specify the id tag (it must have the same value as the name tag). Although Adobe writes that id is an optional tag, Internet Explorer needs the id to address the swf object with the javascript-flash interface.

Solution 4

Try to verify if the element is null like below:

if(element == null)return false

Solution 5

I had the same issue, I've solve it by changing the way I've included the flash. Fristly I had

<object>
<embed></embed></object>
</object>

Than i moved to:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="780" height="420">
        <param name="movie" value="myContent.swf" />
        <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="myContent.swf" width="780" height="420">
        <!--<![endif]-->
          <p>Alternative content</p>
        <!--[if !IE]>-->
        </object>
        <!--<![endif]-->
      </object>

and with the last one it works.

Share:
84,337
Admin
Author by

Admin

Updated on December 30, 2020

Comments

  • Admin
    Admin over 3 years

    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.

  • LocalPCGuy
    LocalPCGuy almost 11 years
    I know this is a little old, but automatic downvote for recommending telling IE9 to render as IE8. Fix the object code instead
  • hairbo
    hairbo over 9 years
    It's perhaps years late, but the current incarnation of JWPlayer does not have an embed tag, and it does have both a classID and ID value on the object tag. yet, in IE9, JWPlayer6.11 still throws this error at some point during (it would appear) the "remove()" routine. I don't know whether to blame IE or JWPlayer, but I need to be able to blame somebody. (-;