kirk.netiq
04-13-2004, 11:45 AM
I am publishing an Authorware piece for web delivery. In this piece I have a text entry field where the user enters some information. The problem is that the current focus is on the browser NOT the embedded Authorware piece. So the user has to click in the browser to be able to enter information into the text feild in the published piece.
My question is - how can I setFocus to the Authroware piece. Each time I publish, a piece will have a different name and is done using document.write
Any help would be greatly appreciated.
Here is the code:
<html>
<head>
<title>Expense Report</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body bgcolor="#555555"onLoad="setFocus()">
<center>
<script language="VBScript">
Function IsAuthorwareControl()
on error resume next
MM_AWARE = False
MM_AWARE = IsObject(CreateObject("Macromedia.AuthorwareShockwaveControl.1"))
IsAuthorwareControl = MM_AWARE
End Function
</script>
<script language="JavaScript">
var MM_AWARE = false
for (i = 0; i < navigator.plugins.length; i++)
if (navigator.plugins[i].name.indexOf("Authorware") != -1)
MM_AWARE = parseFloat(navigator.plugins[i].description.substring(navigator.plugins[i].description.indexOf("version ") + 8)) >= 7;
if (!MM_AWARE && navigator.appName != "Netscape") MM_AWARE = IsAuthorwareControl()
if (MM_AWARE) {
document.write('<object classid="CLSID:15B782AF-55D8-11D1-B477-006097098764" codebase="http://intra.netiq.com/it_training/Authorware 7 Compact Web Player installers/ActiveX Cab/cabload.htm" width="802" height="564">\n');
document.write(' <param name="SRC" value="exreport.aam">\n');
document.write(' <param name="PALETTE" value="background">\n');
document.write(' <param name="WINDOW" value="inPlace">\n');
document.write(' <param name="BGCOLOR" value="#555555">\n');
document.write(' <embed src="exreport.aam" palette="background" window="inPlace" bgcolor="#555555" pluginspage="http://intra.netiq.com/it_training/Authorware 7 Compact Web Player installers/ActiveX Cab/cabload.htm" type="application/x-authorware-map" width="802" height="564">\n');
document.write(' </embed>\n');
document.write('</object>');
} else
document.write('You do not have the Authorware 7 Web Player installed. Please go to back to the start page and read the Web Player installation instructions.');
</script>
</body>
</html>
My question is - how can I setFocus to the Authroware piece. Each time I publish, a piece will have a different name and is done using document.write
Any help would be greatly appreciated.
Here is the code:
<html>
<head>
<title>Expense Report</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body bgcolor="#555555"onLoad="setFocus()">
<center>
<script language="VBScript">
Function IsAuthorwareControl()
on error resume next
MM_AWARE = False
MM_AWARE = IsObject(CreateObject("Macromedia.AuthorwareShockwaveControl.1"))
IsAuthorwareControl = MM_AWARE
End Function
</script>
<script language="JavaScript">
var MM_AWARE = false
for (i = 0; i < navigator.plugins.length; i++)
if (navigator.plugins[i].name.indexOf("Authorware") != -1)
MM_AWARE = parseFloat(navigator.plugins[i].description.substring(navigator.plugins[i].description.indexOf("version ") + 8)) >= 7;
if (!MM_AWARE && navigator.appName != "Netscape") MM_AWARE = IsAuthorwareControl()
if (MM_AWARE) {
document.write('<object classid="CLSID:15B782AF-55D8-11D1-B477-006097098764" codebase="http://intra.netiq.com/it_training/Authorware 7 Compact Web Player installers/ActiveX Cab/cabload.htm" width="802" height="564">\n');
document.write(' <param name="SRC" value="exreport.aam">\n');
document.write(' <param name="PALETTE" value="background">\n');
document.write(' <param name="WINDOW" value="inPlace">\n');
document.write(' <param name="BGCOLOR" value="#555555">\n');
document.write(' <embed src="exreport.aam" palette="background" window="inPlace" bgcolor="#555555" pluginspage="http://intra.netiq.com/it_training/Authorware 7 Compact Web Player installers/ActiveX Cab/cabload.htm" type="application/x-authorware-map" width="802" height="564">\n');
document.write(' </embed>\n');
document.write('</object>');
} else
document.write('You do not have the Authorware 7 Web Player installed. Please go to back to the start page and read the Web Player installation instructions.');
</script>
</body>
</html>