Hello,
Can anyone tell me what the heck this Javascript error means, encountered in Netscape 6.2 (the Javascript code was generated from Flash 6 using the FSCommand Template in the Publishing Options)... The idea behind the code is that when a user clicks on a button in the flash movie, an mini-browser window pops up with a message in it. It seems to work fine in Internet Explorer 6.
Here's the Javascript error that Netscape produces (I've substituted the actual domain name with mydomain.com):
Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMJSWindow.open]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: :: popup_DoFSCommand :: line 383" data: no]
Source File: Line: 383
Here's the Flash Javascript Code that I'm using (line 383 has a comment just before it - in the last 'if' block):
<script LANGUAGE=JavaScript>
<!--
var InternetExplorer = navigator.appName.indexOf("Microsoft" != -1;
// Handle all the the FSCommand messages in a Flash movie
function popup_DoFSCommand(command, args) {
var popupObj = InternetExplorer ? popup : document.popup;
if ( command == "popup" ) {
window.open( "../flash_popup/message.php?ID=" + args, "popupWindow", "width=300,height=300" );
}
}
// Hook for Internet Explorer
if (navigator.appName && navigator.appName.indexOf("Microsoft" != -1 && navigator.userAgent.indexOf("Windows" != -1 && navigator.userAgent.indexOf("Windows 3.1" == -1) {
document.write('<SCRIPT LANGUAGE=VBScript\> \n');
document.write('on error resume next \n');
document.write('Sub popup_FSCommand(ByVal command, ByVal args)\n');
document.write(' call popup_DoFSCommand(command, args)\n');
document.write('end sub\n');
document.write('</SCRIPT\> \n');
}
var MM_contentVersion = 5;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
var words = navigator.plugins["Shockwave Flash"].description.split(" "
for (var i = 0; i < words.length; ++i)
{
if (isNaN(parseInt(words)))
continue;
var MM_PluginVersion = words;
}
var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE">=0
&& (navigator.appVersion.indexOf("Win" != -1)) {
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next \n');
document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
document.write('<OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase=" ID="popup" WIDTH="1" HEIGHT="1" ALIGN="">');
/***** This is line 383 *****/
document.write('<PARAM NAME=movie VALUE="../flash_popup/popup.swf?userid=cp1234&usertype=loan_officer">');
document.write('<PARAM NAME=quality VALUE=low> <PARAM name=userid value=cp1234>');
document.write('<PARAM name=usertype value=loan_officer> <PARAM NAME=bgcolor VALUE=#000066>');
document.write('<EMBED src="../flash_popup/popup.swf?userid=cp1234&usertype=loan_officer" quality=low bgcolor=#000066 WIDTH="1" HEIGHT="1" swLiveConnect=true ID="popup" NAME="popup" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE=" document.write('</OBJECT>');
}
//-->
</SCRIPT>
Can anyone tell me what the heck this Javascript error means, encountered in Netscape 6.2 (the Javascript code was generated from Flash 6 using the FSCommand Template in the Publishing Options)... The idea behind the code is that when a user clicks on a button in the flash movie, an mini-browser window pops up with a message in it. It seems to work fine in Internet Explorer 6.
Here's the Javascript error that Netscape produces (I've substituted the actual domain name with mydomain.com):
Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMJSWindow.open]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: :: popup_DoFSCommand :: line 383" data: no]
Source File: Line: 383
Here's the Flash Javascript Code that I'm using (line 383 has a comment just before it - in the last 'if' block):
<script LANGUAGE=JavaScript>
<!--
var InternetExplorer = navigator.appName.indexOf("Microsoft" != -1;
// Handle all the the FSCommand messages in a Flash movie
function popup_DoFSCommand(command, args) {
var popupObj = InternetExplorer ? popup : document.popup;
if ( command == "popup" ) {
window.open( "../flash_popup/message.php?ID=" + args, "popupWindow", "width=300,height=300" );
}
}
// Hook for Internet Explorer
if (navigator.appName && navigator.appName.indexOf("Microsoft" != -1 && navigator.userAgent.indexOf("Windows" != -1 && navigator.userAgent.indexOf("Windows 3.1" == -1) {
document.write('<SCRIPT LANGUAGE=VBScript\> \n');
document.write('on error resume next \n');
document.write('Sub popup_FSCommand(ByVal command, ByVal args)\n');
document.write(' call popup_DoFSCommand(command, args)\n');
document.write('end sub\n');
document.write('</SCRIPT\> \n');
}
var MM_contentVersion = 5;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
var words = navigator.plugins["Shockwave Flash"].description.split(" "
for (var i = 0; i < words.length; ++i)
{
if (isNaN(parseInt(words)))
continue;
var MM_PluginVersion = words;
}
var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE">=0
&& (navigator.appVersion.indexOf("Win" != -1)) {
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next \n');
document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
document.write('<OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase=" ID="popup" WIDTH="1" HEIGHT="1" ALIGN="">');
/***** This is line 383 *****/
document.write('<PARAM NAME=movie VALUE="../flash_popup/popup.swf?userid=cp1234&usertype=loan_officer">');
document.write('<PARAM NAME=quality VALUE=low> <PARAM name=userid value=cp1234>');
document.write('<PARAM name=usertype value=loan_officer> <PARAM NAME=bgcolor VALUE=#000066>');
document.write('<EMBED src="../flash_popup/popup.swf?userid=cp1234&usertype=loan_officer" quality=low bgcolor=#000066 WIDTH="1" HEIGHT="1" swLiveConnect=true ID="popup" NAME="popup" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE=" document.write('</OBJECT>');
}
//-->
</SCRIPT>