Go
Not registered? Sign up!

Script Error - IE7 & IE8 on Vista

Google Translate
17 posts | return to the Bug Reports forum | get the rss feed for this thread

Mar. 20, 2009Gareth

Guys,

I need some help. Using IE7 or IE8 on Vista (XP works fine), go to this page on my website.

http://garethhooper.com/articles/information-technology/web-multimedia/135-how-to-add-hdhq-youtube-videos-to-a-playlist-for-use-with-the-jw-flv-player-.html

Click play on the player. Now navigate away from the website or close the browser tab. You'll set a script error screenshot below:

http://garethhooper.com//images/stories/articles/IT/scripterror.jpg

I cannot work out for the life of me what is causing it.

Does anyone know? Can anyone point me in the right direction?

Many thanks in advance.

Gareth

Mar. 21, 2009Gareth

Wow! No one else having this problem?

Mar. 25, 2009Tim

Having the same problem in an XP environment but only in Internet Explorer. All seems fine on FF but any page on my site that has embedded videos give error when LEAVING the page only.

http://www.plr.me

Cannot seem to identify the cause of this. Each Video embedded in the page appears to trigger 6 or 7 script errors when exiting the page - all pointing to


function __flash__removeCallback(instance, name) {
instance[name] = null;
}

as the problem code.

Any ideas??

Apr. 01, 2009Ed

I'm also having the same problem leaving pages with embedded videos in IE7/Vista. They work fine in FF and Chrome.

Debugging shows that there are two problematic javascript functions:

__flash__removeCallback(document.getElementById(""), "sendEvent");


__flash__addCallback(instance, name) {
instance[name] = function () {
return eval(instance.CallFunction("<invoke name=\""+name+"\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments,0) + "</invoke>"));
}

Does anyone know where can I find the code for these functions?

Apr. 01, 2009Maarten Wolzak

Hi guys,
I ran into the same error...
It seems that the player keeps calling javascript functions which are unloaded from the browser before the flash plugin is unloaded...
The following solution worked for me:

1 ID the embed as 'myplayer'
2 Wrap the embed tags with an element with ID 'flashholder'.
3 Add the following to the body tag:

onbeforeunload="document.getElementById('flashholder').removeChild(document.getElementById('myplayer'));"

Let me know if it works for you as well!

cheers,
Maarten

Apr. 01, 2009Colin Slade

Hey Maarten,
Could you paste your full code so that I can see exactly how you did it.

I have been having this problem for awhile.

Thanks,
Colin

Apr. 02, 2009Ed

Maarten, thanks so much. That's worked for me! Hurray!

Colin, just to explain what I did, here's Maarten's fix code step-by-step from my site:
1 ID the embed as 'myplayer'
Add id="myplayer" as an extra parameter at the end of the object tag, to give:
<object type="application/x-shockwave-flash" style="width:683px;height:404px;" data="http://mydomain.com/plugins/content/videos/players/mediaplayer_4.0.46.swf" id="myplayer" />

2 Wrap the embed tags with an element with ID 'flashholder'.
Add id="flashholder" as the id of a tag surrounding the embed object. In my case there was a <span> there already but I guess you might need to create a new one. The code for the whole player is:
<span class="videos">
<span style="width:683px;height:404px;" class="video_player" id="flashholder">

<object type="application/x-shockwave-flash" style="width:683px;height:404px;" data="http://mydomain.com/plugins/content/videos/players/mediaplayer_4.0.46.swf" id="myplayer" />
<param name="movie" value="http://mydomain.com/plugins/content/videos/players/mediaplayer_4.0.46.swf" />
<param name="flashvars" value="file=http://www.mydomain.com/content/slayer/slayer.flv" />
</object>
</span>


3 Add the following to the body tag:
For neatness, I did this bit by creating a separate script function near the end of the html <body> called "closeplayer" as follows:
<script>
function closeplayer()
{
document.getElementById('flashholder').removeChild(document.getElementById('myplayer'));
}
</script>

And then I call this function from the main body tag:
<body onbeforeunload="closeplayer()">

And that should do the trick. Have a look for yourself on http://www.rathergood.com/slayer (warning: contains a man shouting).

Apr. 13, 2009Gareth

This worked PERFECTLY!!

Thanks so much for posting this fix. I was show stopped, I couldn't push live with this script error.

Gareth

Apr. 17, 2009Markus

wow thats great to see people being so helpful here!

Id like to fix it on my site too but i cant get it to work.
I though using different code with JW 3.16.

<html>

<HEAD>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<TITLE>TESTS</TITLE>
</head>

<BODY>

<script type="text/javascript" src="http://www.myurl.ie/swfobject.js"></script>
<div id="mediaplayer_nowplaying"></div>

<script type="text/javascript">
var so = new SWFObject('http://www.myurl.ie/mediaplayer.swf','mediaplayer_nowplaying_js','900','140','8');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addVariable('backcolor','0x111111');
so.addVariable('frontcolor','0xffffff');
so.addVariable('lightcolor','0xff9933');
so.addVariable('screencolor','0x000000');
so.addVariable('height','140');
so.addVariable('width','900');
so.addVariable('file','http://www.myurl.ie/playlist.xml');
so.addVariable('displayheight','120');
so.addVariable('displaywidth','180');
so.addVariable('searchbar','false');
so.addVariable('showdownload','true');
so.addVariable('usefullscreen','false');
so.addVariable('thumbsinplaylist','true');
so.addVariable('javascriptid','mediaplayer_nowplaying_js');
so.addVariable('enablejs','true');
so.setAttribute('style', '');
so.write('mediaplayer_nowplaying');
</script>
</div>
</div>

</body>
</html>


Can you please help me?

It wont open in IE7 :( only older version and FF

Thanks

EDIT: HMN,i just found finally a hint about the flash player,i had to deinstall and reinstall to get it working (again) and that solved the problem.

Jul. 13, 2009aman

I keep getting script error in yahoo messenger while chatting
Can anyone help i am using Vista

Jul. 29, 2009Rachna

I have installed JW player , it is working ok on FF but creating problem in IE6 and IE7 . whenever i run my player in IE6 it gives me some _flash_removecallback script error .CAn anybody help me out .em going crazy!!!!!!!

Jul. 29, 2009lost

Upgrade to the latest player (v4.6.248) here:

    http://developer.longtailvideo.com/trac/browser/trunk/as3

Jul. 30, 2009Rachna

http://developer.longtailvideo.com/trac/browser/trunk/as3

I had downloaded this but it is also giving problem in IE6
1st time when we click on button it play but do not show the time when second time chick on button it shows the time and all

Jul. 30, 2009lost

 
Which time isn't showing?

What type of media are you playing? (MP3, MP4, FLV, etc.)

Jul. 30, 2009Rachna

ok i m using mp3 files .i m giveging u my code plz tell me what should i add there to run it on IE7 becoz it is not running in IE7.it plays the track but dont show any timing in player and playing bar on player. it just plays the track.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
</head>

<body style="margin:0; padding:8px 0; background:url(images/background_img.jpg) repeat-x;" onbeforeunload="document.getElementById('flashholder').removeChild(document.getElementById('player'));">
<script type="text/javascript" src="js/swfobject.js"></script>

<span id="flashholder">
<object id="player" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">
<embed src="player/player.swf" width="265" height="20" name="player" allowscriptaccess="always" allowfullscreen="true" flashvars="file=tracks/xyz.mp3&autostart=true&caption=false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"/>
</object>
</span>

</body>
</html>

Jul. 30, 2009lost


flashvars="file=tracks/xyz.mp3&autostart=true&duration=189"

Where duration is the duration of your MP3 in seconds.

Nov. 02, 2009Klaus

Thanks, guys helped me solve my problem

Using longtail in a wordpress page caused IE8 trouble till now, solution :

<span class="videos">
<span id="flashholder">
<span id="mplayer">
[playlist id=1] <!-- wordpress magic here -->
</span>
</span>
</span>

<script>
function closeplayer() {
document.getElementById('flashholder').removeChild(document.getElementById('myplayer'));
}

window.onbeforeunload="closeplayer()"
</script>

Add a reaction

You can also return to the category or try this search for related threads.


 

Search the Forums

Go

Support

Support Here are some helpful links to learn more about the JW Player™:

Monetize Your Video

Monetize Your Video Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!

Why Buy a License?

Why Buy a License? If you don’t buy a commercial license, you cannot use a JW Player™ on (i) a site that has ads; (ii) a corporate site; or a (iii) CMS. Our licenses are very inexpensive, so what are you waiting for? Buy a license today.