Skip to content Skip to sidebar Skip to footer

Script5007: Unable To Get Value Of The Property 'setreturnvalue': Object Is Null Or Undefined

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

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 --><metahttp-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)returnfalse

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:

<objectclassid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"width="780"height="420"><paramname="movie"value="myContent.swf" /><!--[if !IE]>--><objecttype="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.

Post a Comment for "Script5007: Unable To Get Value Of The Property 'setreturnvalue': Object Is Null Or Undefined"