Issue 1593: Skill port not working
http://code.google.com/p/chromium/issues/detail?id=1593
Comment #3 by bijesh.kalloorath:
hi,
I have attached the screen shot from IE and Chrome. I think this uses Java
and Flash
player. The source code from popup window (IE) is below
<html>
<head>
<title>Intro Screen...</title>
<script>
document.write("<script src='assets/html/findPlayer.js'><\/script>");
document.write("<script src='assets/html/keylistener.js'><\/script>");
document.write("<script src='assets/html/windowFunctions.js'><\/script>");
document.write("<script src='assets/html/js/headerparams.js'><\/script>");
</script>
<script>document.onkeyup=handleShortCut;</script>
<!--
This script includes javascript files required to support E3 results. It
must be placed here in the HEAD so that the scripts are executed prior to
loading the applet, since the scripts set some key values that we need
to send to the applet as startup params.
-->
<script>
var searchString = new String(window.location.search);
searchString = unescape(searchString);
// replace any spaces to we can pass this to the applet
searchString = searchString.replace(/ /g, "%20");
var useE3 = (unescape(searchString).toUpperCase().indexOf("XML_URL") != -1);
//Added by Harsh - The E3 course was not starting up as useTP variable is
required in
//writePlayerApplet funtion of ActiveXCheck.js
var useTP = (searchString.toUpperCase().indexOf("DIRECTTEST") != -1);
// Dialog course for CCA
var useDialog =
(unescape(searchString).toUpperCase().indexOf("DIALOGUE=2") != -1);
// We need to take special actions to properly time switch to HTML mode
// if we display HTML page directly at launch
var isDirectHtmlLaunch =
(unescape(searchString).toUpperCase().indexOf("ELO.XML") != -1) ||
(unescape(searchString).toUpperCase().indexOf("ELO1.XML") != -1) ||
useTP;
// js needed to support serialized Java-to-JS requests in results classes
document.write("<script src='assets/html/js/queue.js'><\/script>");
document.write("<script src='assets/html/js/utils.js'><\/script>");
var scormVersion = "";
if (useE3) {
// The API the player will use to communicate with external SCORM API
var extAPI = null;
// The API that the UAE and JSAPI content will use to communicate
// with the player
var API = null;
var sfGhost = new Object();
sfGhost.bUsingGhostAPI = false;
sfGhost.bModProgressCreated = false;
sfGhost.appletReady=false;
sfGhost.calledFromUAE=false;
sfGhost.bClosingUAEbyBS=false;
var player = null;
var sBrowser ="IE";
document.write("<script
src='assets/html/js/2004APIAdaptor.js'><\/script>");
document.write("<script src='assets/html/findAPI.js'><\/script>");
document.write("<script src='assets/html/js/playerAPI.js'><\/script>");
}
else {
scormVersion = parent.scormVersion;
}
// Note that the vars set inside the above javascript files are not defined
// until AFTER the closing script tag below!!
</script>
</head>
<body>
<SCRIPT language="JavaScript" src="ActiveXCheck.js"></SCRIPT>
<SCRIPT language="JavaScript">
var splashLoc;
var fsfpWidth = 0;
var fsfpHeight = 0;
// Put this ahead of the LMS code which can reset searchString
var useSigned =
(unescape(searchString).toUpperCase().indexOf("SIGNED_APPLET=TRUE")
!= -1);
//Added by Harsh - The E3 course was not starting up as e3Unsigned variable
is
required in
//writePlayerApplet funtion of ActiveXCheck.js
var e3Unsigned =
(unescape(searchString).toUpperCase().indexOf("SIGNED_APPLET=FALSE")
!= -1);
var useFSFP =
(unescape(searchString).toUpperCase().indexOf("DIALOGUE=1") != -1);
var XML_URL;
var appletNavbarHeight = 50;
var appletToolbarHeight = 25;
var ccaAppletHeight = 636;
var minCCAFrameHeight =
ccaAppletHeight-appletNavbarHeight-appletToolbarHeight;
var appletHeight = 611;
var appletWidth = 795;
var appletTop = -appletNavbarHeight;
var applet1Height = appletNavbarHeight;
var pageHtmlHeight = 457;
var pageHtmlWidth = appletWidth+1;
var pageHtmlTop = 511;
var pageHtmlOrig = 54;
var rspPageHeight = 0;
var applet8x6offset = 0;
var htmlHeaderHeight = 54;
var htmlOffset = 20;
var htmlHeaderTop = 0;
if (useFSFP || useDialog || parent.isCCA) {
if (typeof( window.innerWidth ) == 'number' ) {
fsfpWidth = window.innerWidth;
fsfpHeight = window.innerHeight;
} else if (document.documentElement &&
(document.documentElement.clientWidth ||
document.documentElement.clientHeight ) ) {
fsfpWidth = document.documentElement.clientWidth;
fsfpHeight = document.documentElement.clientHeight;
} else if (document.body && ( document.body.clientWidth ||
document.body.clientHeight ) ) {
// we get here in IE
fsfpWidth = document.body.clientWidth;
fsfpHeight = document.body.clientHeight;
}
// enforce a minimum height for standard CCA content
if (parent.isCCA && !useDialog && !useFSFP) {
if (fsfpHeight < minCCAFrameHeight)
fsfpHeight = minCCAFrameHeight;
}
}
// If this is Custom Content we will need to tweak the
appletHeight/AppletWidth/pageHTMLWidth
// to reflect the initial size parameters and client area dimensions
// These numbers are derived by the relative relationships between pageHtml
and
Applet heights/tops
if ( parent.isCustomContentLaunch == true) {
appletWidth = parent.customWidth;
appletHeight = parent.customHeight + (appletToolbarHeight +
appletNavbarHeight);
// Add to offset applet1Height/appletTop
pageHtmlWidth = appletWidth;
pageHtmlTop = parent.customHeight - (appletToolbarHeight +
appletNavbarHeight); //
Same as E3 clientHeight from index.html - 75
pageHtmlHeight = pageHtmlTop - 27; // pageHtmlTop - header height (54)
appletTop = -(appletToolbarHeight + appletNavbarHeight);
applet1Height = (appletToolbarHeight + appletNavbarHeight);
} else if (useE3 && !useFSFP) {
// If the default appletHeight changes, change references to it inside
the
applet.
appletHeight = 636; // Actual height for IE6 (from index.html)
561 + 75
appletTop = -(appletToolbarHeight + appletNavbarHeight);
applet1Height = (appletToolbarHeight + appletNavbarHeight);
pageHtmlHeight = 432;
pageHtmlWidth = 788;
pageHtmlTop = 486; // default height(561) from index.html - 75
} else if (useFSFP) {
appletWidth = fsfpWidth -1;
appletTop = -(appletToolbarHeight + appletNavbarHeight);
appletHeight = fsfpHeight + (appletToolbarHeight + appletNavbarHeight);
applet1Height = (appletToolbarHeight + appletNavbarHeight);
pageHtmlWidth = appletWidth + 1;
pageHtmlTop = fsfpHeight - (appletToolbarHeight + appletNavbarHeight);
pageHtmlHeight = pageHtmlTop - htmlHeaderHeight;
rspPageHeight = fsfpHeight - appletNavbarHeight;
} else if (parent.isCCA && !parent.isCJ) {
appletTop = -(appletToolbarHeight + appletNavbarHeight);
appletWidth = fsfpWidth -1;
applet1Height = (appletToolbarHeight + appletNavbarHeight);
pageHtmlWidth = appletWidth + 1;
appletHeight = fsfpHeight + (appletToolbarHeight + appletNavbarHeight);
pageHtmlTop = fsfpHeight - (appletToolbarHeight + appletNavbarHeight);
pageHtmlHeight = fsfpHeight - (htmlHeaderHeight + appletToolbarHeight +
appletNavbarHeight); // -54 (header) - 25 (toolbar) -50 (navbar)
if (useDialog) {
appletTop = -appletNavbarHeight;
appletHeight = fsfpHeight + appletNavbarHeight;
pageHtmlTop = fsfpHeight - appletNavbarHeight;
pageHtmlHeight = fsfpHeight - appletNavbarHeight;
htmlHeaderHeight = 0;
}
}
if (self.screen.height < 801 && document.body.clientHeight < 560) {
if (useFSFP || useDialog) {
applet8x6offset = 553 - fsfpHeight;
appletTop -= applet8x6offset;
appletHeight += applet8x6offset;
pageHtmlTop -= applet8x6offset;
} else if ( parent.isCustomContentLaunch == true) {
pageHtmlTop = parent.customHeight - 67;
pageHtmlHeight = pageHtmlTop - 29;
} else {
applet8x6offset = 553 - document.body.clientHeight;
pageHtmlTop -= applet8x6offset;
appletTop -= applet8x6offset;
pageHtmlOrig -= (applet8x6offset-htmlOffset);
htmlHeaderTop = applet8x6offset-htmlOffset;
pageHtmlHeight = pageHtmlHeight - htmlOffset;
}
}
var appletLeft = -appletWidth;
var scpTopLevel = findVirtualTop ();
var altPlayer = false;
var altIdx = scpTopLevel.toLowerCase().lastIndexOf("/content");
if (altIdx > -1) {
altStr = scpTopLevel.substring (altIdx).toLowerCase();
if (altStr != "/content") {
altPlayer = true;
}
} else {
altPlayer = true;
}
if (parent.coursename == null || parent.coursename == "") {
splashLoc = parent.lang + parent.separator + "assets/splash.htm";
} else {
if (useE3) {
splashLoc = parent.splashPath;
} else {
if (parent.isCCA) {
var newName = parent.coursename.substring (0,
parent.coursename.lastIndexOf("_"));
splashLoc = scpTopLevel.substring (0,
scpTopLevel.lastIndexOf("/")) +
"/Content/cca/" + newName + "/output/splash.htm";
} else {
splashLoc = scpTopLevel.substring (0,
scpTopLevel.lastIndexOf("/")) +
"/Content/player/" + parent.coursename + "/output/splash.htm";
}
}
}
var splashHeight = appletHeight +appletTop;
if (parent.isCCA) {
document.write("<DIV ID=\"blockDiv1\" STYLE=\"position:absolute;
width:"+pageHtmlWidth+"; height:" + splashHeight + ";\">");
document.write("<IFRAME TABINDEX=\"-1\" SRC=" + splashLoc + " WIDTH=\""
+appletWidth +"\" HEIGHT=\"" + splashHeight + "\" SCROLLING=\"no\"
BORDER=\"0\"
MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\" FRAMEBORDER=\"0\" NAME=\"Splash\"
ALIGN=\"top\"
TITLE=\"Loading Course. Please Wait.\">");
} else {
document.write("<DIV ID=\"blockDiv1\" STYLE=\"position:absolute;
left:110; top:80;
width:561; height:400;\">");
document.write("<IFRAME TABINDEX=\"-1\" SRC=" + splashLoc + "
WIDTH=\"561\"
HEIGHT=\"400\" SCROLLING=\"no\" BORDER=\"0\" MARGINWIDTH=\"0\"
MARGINHEIGHT=\"0\"
FRAMEBORDER=\"0\" NAME=\"Splash\" ALIGN=\"top\" TITLE=\"Loading Course.
Please
Wait.\">");
}
document.write("</IFRAME>");
document.write("</DIV>");
document.write("<DIV ID=\"blockDiv2\" WIDTH=\"" +appletWidth +"\" HEIGHT=\""
+appletHeight +"\" STYLE=\"position:absolute; left:" +appletLeft +"; top:"
+appletTop
+"; width:" +appletWidth +"; height:" +appletHeight +";\">");
writePlayerApplet (useSigned, searchString, appletWidth, appletHeight,
parent.isCustomContentLaunch, e3Unsigned, useTP);
document.write("</DIV>");
document.write("<DIV ID=\"blockDiv3\" hideFocus=true
STYLE=\"position:absolute;
left:-"+pageHtmlWidth+"; top:" +pageHtmlOrig+ "; width:"+pageHtmlWidth+";
height:"
+pageHtmlHeight +";\">");
document.write("<IFRAME TABINDEX=\"1\" SRC=assets/noop.htm WIDTH=\""+
pageHtmlWidth
+"\" HEIGHT=\"" + pageHtmlHeight +"\" SCROLLING=\"auto\" BORDER=\"5\"
MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\" FRAMEBORDER=\"5\" ALIGN=\"top\"
NAME=\"contentFrame\" TITLE=\"System Frame (no user interaction required) -
Content\">");
document.write("</IFRAME>");
document.write("</DIV>");
document.write("<DIV ID=\"blockDiv4\" STYLE=\"position:absolute; left:"
+appletLeft
+"; top:(0 - "+htmlHeaderTop+"); width:" +appletWidth +"; height:" +
htmlHeaderHeight
+ ";\">");
document.write("<IFRAME TABINDEX=\"2\" SRC=assets/noop.htm WIDTH=\""
+appletWidth
+"\" HEIGHT=\"" + htmlHeaderHeight + "\" SCROLL=\"no\" BORDER=\"0\"
MARGINWIDTH=\"0\"
MARGINHEIGHT=\"0\" FRAMEBORDER=\"0\" ALIGN=\"top\" NAME=\"headerTitleFrame\"
TITLE=\"System Frame (no user interaction required) - HeaderTitle\">");
document.write("</IFRAME>");
document.write("</DIV>");
document.write("<DIV ID=\"blockDiv5\" STYLE=\"position:absolute; left:"
+appletLeft
+"; top:0; width:" +appletWidth +"; height:525;\">");
document.write("<IFRAME TABINDEX=\"-1\" SRC=assets/noop.htm WIDTH=\""
+appletWidth
+"\" HEIGHT=\"525\" SCROLL=\"no\" BORDER=\"0\" MARGINWIDTH=\"0\"
MARGINHEIGHT=\"0\"
FRAMEBORDER=\"0\" ALIGN=\"top\" NAME=\"gotrain\" TITLE=\"System Frame (no
user
interaction required) - GoTrain\">");
document.write("</IFRAME>");
document.write("</DIV>");
document.write("<DIV ID=\"blockDiv6\" hideFocus=true
STYLE=\"position:absolute;
left:-"+pageHtmlWidth+"; top:0; width:"+pageHtmlWidth+"; height:"
+rspPageHeight
+";\">");
document.write("<IFRAME TABINDEX=\"1\" SRC=assets/noop.htm WIDTH=\""+
pageHtmlWidth
+"\" HEIGHT=\"" + rspPageHeight +"\" SCROLLING=\"auto\" BORDER=\"5\"
MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\" FRAMEBORDER=\"5\" ALIGN=\"top\"
NAME=\"fsfpFrame\" TITLE=\"System Frame (no user interaction required) -
Content\">");
document.write("</IFRAME>");
document.write("</DIV>");
document.write("<DIV ID=\"blockDiv7\" hideFocus=true
STYLE=\"position:absolute;
left:-"+pageHtmlWidth+"; top:0; width:"+pageHtmlWidth+"; height:"
+rspPageHeight
+";\">");
document.write("<IFRAME TABINDEX=\"-1\" SRC=assets/noop.htm WIDTH=\""+
pageHtmlWidth
+"\" HEIGHT=\"" + rspPageHeight +"\" SCROLLING=\"auto\" BORDER=\"5\"
MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\" FRAMEBORDER=\"5\" ALIGN=\"top\"
NAME=\"flashAudioFrame\" TITLE=\"System Frame (no user interaction
required) -
Content\">");
document.write("</IFRAME>");
document.write("</DIV>");
if (isDirectHtmlLaunch) {
// Give the remote control class a chance to get initialized before
// we make the call.
setTimeout("initAppletComm()", 1000);
}
// Added to surpress script error
// when openning course
try {
if (parent.isCCA) {
document.CCAPlayer.focus();
} else {
document.PagePlayer.focus();
}
} catch(e) {}
document.close();
/**
* A method that makes the first js to applet communication. For direct
HTML
* page launches, the player will wait for this notification until
proceeding
* in case the browser is configured to prompt to approve this communication
*/
function initAppletComm() {
try {
str = document.PagePlayer.remoteControl("initComm");
if ((str == null) || (str != "initialized")) {
// sometimes the remote control is not ready to recieve
requests,
// so try again until we succeed.
setTimeout("initAppletComm()", 500);
}
} catch(e) {
// sometimes we get an exception here, maybe applet not ready?
setTimeout("initAppletComm()", 500);
}
}
function switchFrames() {
setTimeout("doSwitch()", 100);
}
function unloadFlash() {
document.all.blockDiv3.all.contentFrame.src ="assets/noop.htm";
if (useFSFP) {
document.all.blockDiv6.all.fsfpFrame.src ="assets/noop.htm";
}
if (parent.isCCA)
document.all.blockDiv4.all.headerTitleFrame.src="assets/noop.htm";
// Hide flashframe, title areas
if ( parent.isCustomContentLaunch == true ) {
document.all.blockDiv3.style.left = -(appletWidth + 20);
document.all.blockDiv4.style.left = -(appletWidth + 20);
} else {
document.all.blockDiv3.style.left = -1816; // large enough to hide all
html
content widths
document.all.blockDiv4.style.left = -1816; // large enough to hide all
html
content widths
document.all.blockDiv6.style.left = -1816; // large enough to hide all
html
content widths
}
// Show applet area
document.all.blockDiv2.style.top = appletTop;
document.all.Applet1.top = appletTop;
document.all.Applet1.height = appletHeight;
// Workaround for a problem with Java 1.4.1, see CR 8079
if (parent.isCCA) {
document.CCAPlayer.width = appletWidth + 1;
} else {
document.PagePlayer.width = appletWidth + 1;
}
if (parent.isCCA) {
document.CCAPlayer.forceRedraw();
} else {
document.PagePlayer.forceRedraw();
}
requestAppletFocus();
}
var name;
function displayGoTrain(studentName) {
// Set the name to be retrieved by gotrain2 page
name = studentName;
setTimeout("doDisplayGoTrain();", 1000);
}
function doDisplayGoTrain() {
// Center the gotrain2 page (blockDiv5)
document.all.blockDiv5.all.gotrain.src=parent.lang+"/assets/html/gotrain2.htm";
document.all.blockDiv5.style.left = 98;
document.all.blockDiv5.style.top = 20;
// Hide the splash screen
document.all.blockDiv1.style.left = appletLeft;
// Hide the applet. This is required on relaunches.
document.all.blockDiv2.style.left = appletLeft;
}
function getName() {
// Function to be called by gotrain2 page
return name;
}
function getImportJS (){
var str;
if (parent.isCCA) {
str = document.CCAPlayer.remoteControl("getImportJS");
} else {
str = document.PagePlayer.remoteControl("getImportJS");
}
return str;
}
var firstDisplayComplete = false;
function displayFlash(isUAE) {
if (useFSFP && !isUAE) {
document.all.blockDiv6.style.left = 0;
document.all.blockDiv2.style.top = pageHtmlTop +
appletToolbarHeight +
applet8x6offset; // no toolbar for FSFP
} else if (useDialog) {
document.all.blockDiv3.style.top = 0;
document.all.blockDiv3.style.left = 0;
document.all.blockDiv2.style.top = pageHtmlTop + applet8x6offset;
} else {
document.all.blockDiv4.style.top = 0 - htmlHeaderTop;
document.all.blockDiv4.style.left = 0;
document.all.blockDiv3.style.left = 0;
document.all.blockDiv2.style.top = pageHtmlTop;
}
document.all.blockDiv2.style.left = 0;
document.all.blockDiv2.style.height = 0;
document.all.Applet1.height = applet1Height;
document.all.Applet1.top = pageHtmlTop;
// Notify the player that we have completed the flash display switch so
// it can now trigger the call to doSwitch for direct HTML launches.
if (isDirectHtmlLaunch && !firstDisplayComplete) {
document.PagePlayer.remoteControl("displayFlashComplete");
}
firstDisplayComplete = true;
flashFocus();
}
function loadFlash (fileToLoad, isUAE) {
document.all.blockDiv4.all.headerTitleFrame.src
= "assets/html/headerIE.htm";
// if japanese content in E3 and it is not a UAE launch, use a
different frame
size
// if it is E3 R2 content, that is it is not using switcher.html as
it's frame
file
// then use a different frame size.
// also need to special case articles and mentored exercises
var special = fileToLoad.indexOf("switcher.html") == -1 &&
fileToLoad.indexOf("me.html") == -1 &&
fileToLoad.indexOf("summary.html") == -1 &&
fileToLoad.indexOf("nito.html") == -1 &&
fileToLoad.indexOf("index.html") == -1 &&
fileToLoad.indexOf("article/") == -1 &&
fileToLoad.indexOf("mentex/") == -1;
if (useFSFP && !isUAE) {
document.all.blockDiv6.all.fsfpFrame.src=fileToLoad;
} else {
document.all.blockDiv3.all.contentFrame.src=fileToLoad;
}
// If this is a Custom Content Launch, ignore special conditions
if ( parent.isCustomContentLaunch == true ) {
document.all.blockDiv3.all.contentFrame.width=pageHtmlWidth;
document.all.blockDiv3.all.contentFrame.height=pageHtmlHeight;
}
else {
if (useE3 && special && !isUAE && !useFSFP) {
document.all.blockDiv3.all.contentFrame.width="810";
document.all.blockDiv3.all.contentFrame.height="421";
} else {
document.all.blockDiv3.all.contentFrame.width=pageHtmlWidth;
document.all.blockDiv3.all.contentFrame.height=pageHtmlHeight;
}
}
}
function noContext() {
return false;
}
// give focus to the exit button in the header.html panel
function headerFocus() {
document.headerTitleFrame.exitButton.document.all.exitButtonLink.focus();
}
function helpButtonFocus() {
document.headerTitleFrame.helpButton.document.all.helpButtonLink.focus();
}
//give the flash frame focus
function flashFocus() {
document.contentFrame.focus();
}
function is508ModeEnabled() {
return document.PagePlayer.is508ModeEnabled();
}
// request focus for the applet
function requestAppletFocus() {
var frame2 = document.all.blockDiv2;
// if E3 and PageHTML, give focus to content
if(useE3 && (frame2.style.top == pageHtmlTop || frame2.style.top ==
pageHtmlTop+"px")){
setTimeout("document.PagePlayer.remoteControl('e3focusNavbar');",0);
} else {
if (parent.isCCA) {
document.CCAPlayer.remoteControl("requestAppletFocus");
} else {
document.PagePlayer.remoteControl("requestAppletFocus");
}
}
}
function requestButtonFocus() {
if (parent.isCCA) {
document.CCAPlayer.remoteControl("requestButtonFocus");
} else {
document.PagePlayer.remoteControl("requestButtonFocus");
}
}
function doSwitch() {
// Hide GoTrain, splash screen areas
document.all.blockDiv5.style.left=appletLeft;
document.all.blockDiv5.all.gotrain.src="assets/noop.htm";
document.all.blockDiv1.style.left=appletLeft;
document.all.blockDiv1.all.Splash.src="assets/noop.htm";
// Show applet area
// if Applet1.height is 75 then the navPanelTop is visible and the user
is
// in an HTML page. Therefore we must not hide it.
if (document.all.Applet1.height != applet1Height) {
document.all.blockDiv2.style.top = appletTop;
}
document.all.blockDiv2.style.left = 0;
if (parent.isCCA) {
document.CCAPlayer.width = appletWidth + 1;
} else {
document.PagePlayer.width = appletWidth + 1;
}
// Pass focus to the applet
requestAppletFocus();
}
</script>
</body>
</html>
Attachments:
Screen Shots.xls 616 KB
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Chromium-bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/chromium-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---