Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FSCommand and Netscape 6.2

Status
Not open for further replies.

g8z

Programmer
Dec 18, 2001
12
US
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(&quot;Microsoft&quot;) != -1;
// Handle all the the FSCommand messages in a Flash movie
function popup_DoFSCommand(command, args) {
var popupObj = InternetExplorer ? popup : document.popup;

if ( command == &quot;popup&quot; ) {

window.open( &quot;../flash_popup/message.php?ID=&quot; + args, &quot;popupWindow&quot;, &quot;width=300,height=300&quot; );
}
}
// Hook for Internet Explorer
if (navigator.appName && navigator.appName.indexOf(&quot;Microsoft&quot;) != -1 && navigator.userAgent.indexOf(&quot;Windows&quot;) != -1 && navigator.userAgent.indexOf(&quot;Windows 3.1&quot;) == -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[&quot;application/x-shockwave-flash&quot;]) ? navigator.mimeTypes[&quot;application/x-shockwave-flash&quot;].enabledPlugin : 0;
if ( plugin ) {
var words = navigator.plugins[&quot;Shockwave Flash&quot;].description.split(&quot; &quot;);
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(&quot;MSIE&quot;)>=0
&& (navigator.appVersion.indexOf(&quot;Win&quot;) != -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(&quot;ShockwaveFlash.ShockwaveFlash.&quot; & MM_contentVersion)))\n');
document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
document.write('<OBJECT classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot; ID=&quot;popup&quot; WIDTH=&quot;1&quot; HEIGHT=&quot;1&quot; ALIGN=&quot;&quot;>');

/***** This is line 383 *****/
document.write('<PARAM NAME=movie VALUE=&quot;../flash_popup/popup.swf?userid=cp1234&usertype=loan_officer&quot;>');

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=&quot;../flash_popup/popup.swf?userid=cp1234&usertype=loan_officer&quot; quality=low bgcolor=#000066 WIDTH=&quot;1&quot; HEIGHT=&quot;1&quot; swLiveConnect=true ID=&quot;popup&quot; NAME=&quot;popup&quot; ALIGN=&quot;&quot; TYPE=&quot;application/x-shockwave-flash&quot; PLUGINSPAGE=&quot; document.write('</OBJECT>');
}

//-->
</SCRIPT>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top