Getting variables into captivate from parent container
I noticed that once my Captivate module is published to my Adobe Connect server it resides inside a container that has the following code:
<title>xxxxx</title>
<script type="text/javascript" src="/common/scripts/s_code.js?ver=9.2.1"></script><script type="text/javascript" src="/common/scripts/OmnitureTracker.js?ver=9.2.1"></script><script type="text/javascript" src="/common/scripts/modalDialog/jquery-1.7.1.js?ver=9.2.1" charset="utf-8"></script><script>
var isReview = 'false';
// Copyright (c) 2001 - 2009 Adobe Systems Inc. and its licensors. All rights reserved.
function isReviewMode()
{
return Boolean(isReview);
}
function initReviewFrame()
{
var frameDoc = window.frames.ReviewMode;
frameDoc.document.open();
frameDoc.document.write("<html><body style=\"background-color:rgb(103,103,103);\"><style>.rtop,.rbottom{display:block}.rtop *,.rbottom *{display:block;height: 1px;overflow: hidden}.r1{margin: 0 5px}.r2{margin: 0 3px}.r3{margin: 0 2px}.r4{margin: 0 1px;height: 2px}.rs1{margin: 0 2px}.rs2{margin: 0 1px}#rmMsg {width:400px;position:relative;top:3px;background-color:#DBDBDB;margin:5 5 10 5px;}<\/style><script type=\"text/javascript\" src=\"/common\/scripts/xxxUI.js\"><\/script><script type=\"text/javascript\">window.onload=function(){Rounded(\"div#rmMsg\",\"#676767\",\"#DBDBDB\");}<\/script><center><div id=\"rmMsg\"><table><tr><td style=\"vertical-align:top\"><img src=\"/common/images/icon_review_mode.gif\" height=\"31\" width=\"32\"><\/td><td style=\"font-size:8pt;color:#676767;font-family:arial;padding-left:20px\">You are now in Review Mode. Any choices selected will not be tracked.<\/td><\/tr><\/table></div></center></body></html>");
frameDoc.document.close();
}
function flushContentQueue() {
getFlexApp('theFlashObj').FlushBreezeLMSQueue();
}
function unloadWindow() {
if (window.opener!=null) {
// If the refreshCurriculumTree method exists, then call it.
// Otherwise, just reload the page.
if (window.opener.refreshCurriculumTree) {
window.opener.refreshCurriculumTree();
} else {
var URL = unescape(window.opener.location);
window.opener.location.href = URL;
}
}
}
function resizeWin(w,h) {
if (parseInt(navigator.appVersion)>3 && w > 0 && h > 0) {
sw = screen.width;
sh = screen.height;
l = sx = top.screenLeft; if (l == undefined) l = window.screenX;
t = sy = top.screenTop; if (t == undefined) t = window.screenY;
if (w > sw) {
h *= (sw/w);
w = sw;
}
if (h > sh) {
w *= (sh/h);
h = sh;
}
// if (l + w > sw)
l = (sw - w) / 2;
// if (t + h > sh)
t = (sh - h) / 2;
if (l != sx || t != sy)
{
top.moveTo(l, t);
}
// If in review mode, resize the window by dimenstions of review
// mode message.
if (isReview == 'true') {
h += 60;
if (w<420) w=420;
}
if (navigator.appName=="Netscape") {
var hdiff = window.outerHeight - window.innerHeight;
var wdiff = window.outerWidth - window.innerWidth;
top.resizeTo(w + wdiff, h + hdiff);
} else {
top.resizeTo(w, h);
if (navigator.appName=="Microsoft Internet Explorer") {
b = document.body;
top.resizeBy(w - b.clientWidth, h - b.clientHeight);
}
}
}
}
function changeTitle(newTitle)
{
document.title = newTitle;
}
// *** below are functions for meeting dashboard. Catching onFocus/onBlur and calling flex app ****
// This function returns the appropriate reference,
// depending on the browser.
function getFlexApp(appName)
{
if (navigator.appName.indexOf ("Microsoft") !=-1)
{
return window[appName];
}
else
{
var appInst = document[appName];
return document[appName];
}
}
function onBlur()
{
if(getFlexApp('theFlashObj')!=null && getFlexApp('theFlashObj').setBrowserFocus!=null)
getFlexApp('theFlashObj').setBrowserFocus(0);
}
function onFocus()
{
if(getFlexApp('theFlashObj')!=null && getFlexApp('theFlashObj').setBrowserFocus!=null)
getFlexApp('theFlashObj').setBrowserFocus(1);
}
if (/*@cc_on!@*/false) // check for Internet Explorer
{
// do nothing for IE right now .. doesn't work gives script error
//document.onfocusin = onFocus;
//document.onfocusout = onBlur;
}
else
{
window.onfocus = onFocus;
window.onblur = onBlur;
}
//*** end of meeting dashboard functionality **
function onContentPageLoad()
{
var contentType = 'content';
if(contentType && (contentType == 'meeting' || contentType == 'curriculum') )
{
return ; // In case of event containing meeting or curriculum as content, then we will send login event from meeting code or curriculum page.
//For meeting reporting has to be done using event sco. Bug: 2937033.
//For curriculum this had to be done since this page was unloaded very quickly so some redirect requests were not handled for reporting login. Bug: #3200139
}
var reportSuiteId = "";
var trackingServer = "";
var visitorNamespace = "";
if(reportSuiteId.length>0)
{
createOmnitureReportingTracker(reportSuiteId,visitorNamespace,trackingServer);
var eventSco = "28884035";
var scoNameSignature = "";
var campaignId = "";
var userName = "";
userName = "Bob Taylor";
var principalId = "";
principalId = "488401";
pushLoginEvent(scoNameSignature, eventSco, userName, principalId, campaignId);
}
}
onContentPageLoad();
</script>
</head>
<frameset onunload="" onload="resizeWin(800, 600)">
<frame src="/xxxx/">
</frameset>
<noframes>
<a href="/xxxx/">
</noframes>
</html>
How can I get the var userName from this container into my Captivate?
I am using:
- Adobe Captivate 8
- SCORM 1.2
- Adobe Connect Server
- The published zip has the following:
- Captivate.css
- Module1.htm (this does not have the code that I've mentioned above)
- Module1.swf
- standard.js
