Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Modify HTML wrapper and standard.js files still possible?

Participant ,
Mar 21, 2016 Mar 21, 2016

Greetings,

I have been working with Adobe Captivate for a number of years. After version 5.5 Adobe changed the manner in which Captivate published its files for SCORM 1.2. In previous versions I was able to utilize a few modifications to Captivate's default.htm or custom.html and standard.js files to add functionality.

I have worked with several different LMS systems and have found that the cross-domain script (script #2) to be very useful for launching SCORM content hosted on a sub-domain within an organization and still have it track in the LMS.

The other script (script #1) openBrWindow, was useful in displaying additional, optional content not embedded in the Captivate project file but housed either locally or (if I use a full URL) housed in another domain (no tracking necessary here).

In the standard.js file I would add these two javascripts and have them function automatically, or call them when I needed them.

Imbed in standard.js

Script #1 to open a browser window on top of a project window. The purpose was to display ancillary documents for illustration or added information. Documents separate from the Captivate project content.

function openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}

// For 'featuers' use these calls separated by a comma, use no spaces.

// toolbar=yes,

// location=yes,

// status=yes,

// menubar=yes,

// scrollbars=yes,

// resizable=yes,

// width=numberofpixels,

// height=numberofpixels,

Script #2 was designed to allow cross-domain content to properly track in the LMS

 

<!-- <script language="JavaScript">

//work around cross-domain scripting

if(document.domain != "undefined" && document.domain != "")

{

  document.domain = document.domain.substring(document.domain.indexOf('.')+1);

}

</script> -->

I also modified the custom.htm file and used it rather than the default.htm file so I could eliminate blank-space padding that wrapped the content when it displayed in an LMS browser window.

I'm finding that with Captivate 6, 7, 8 and 9 source files that these scripts do not work as they did, and that I am unable to have a custom.htm file to use when I want to to display a project without blank space around the content.

Is it still possible for me to use these scripts still? Am I implementing them correctly? Do they need modification? Is there different functionality in the later versions of Captivate that will accomplish much the same thing?

Thank you,

Tim Kern

666
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2016 Mar 21, 2016

From Captivate 6 onward Adobe chose to change over to Rustici SCORM drivers instead of the ones they had programmed themselves.  These new drivers were a big improvement.  However, in your case it has probably meant your previous scripts are no longer compatible.

You will probably need to modify your scripts in order to get them to work again, but I cannot tell you how to do that.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 22, 2016 Mar 22, 2016

Hi Rod,

I did not know that. I did notice that the backend javascript was a bit different. What makes me wonder is, I am calling the javascript from the onClick event. I thought javascript was javascript, but apparently it matters how it is embedded in the project files. I will keep working on it.

What I want to be able to do is have a click event that spawns a window of specific dimensions, with specific attributes and containing the content I want. I want that window to display on top of the project window.

The cross domain thing is also bothersome, but I know the SCORM rules and I was bypassing them in the past. My bad. I'll just have to play by the rules now.

Thank you for your reply.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Mar 22, 2016 Mar 22, 2016

Are you publishing to SWF only?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 22, 2016 Mar 22, 2016

Hi TLC Design,

I am publishing to SCORM 1.2. So it is more than just a sf file. The package needs to talk to the LMS and store specific session variables.

Tim

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Mar 23, 2016 Mar 23, 2016

I understand that it's SCORM 1.2, it's just that if you are also publishing to HTML5 there are different template files than those used by SWF. I've never had any problem using external scripts and there are several ways they can be included in the published output.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 23, 2016 Mar 23, 2016

Hi TLCMediaDesign,

I apologize for not being clearer. I am not publishing to HTML 5, just SWF. The reason (in the past) that I wrote scripts into the standard.js files was that I could call them easily from the JavaScript window using a single string. It used to be that dropping a full function in the window did not work, spaces in the function tended to break the functionality. I haven't tested that lately, but if the interface has been improved, then I can easily do that.

All I really want to do is to open a window on top of my LMS spawned window when the user clicks a link. I don't want the content replaced within the LMS spawned window. The window needs to be independent of the lesson, window features can be included or excluded and the window needs to "float" on top of the regular lesson.

Thank you,

Tim

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Mar 23, 2016 Mar 23, 2016
LATEST

I don't see why that wouldn't work then. The standard.js is included with swf output. C:\Program Files\Adobe\Adobe Captivate 8 x64\Templates\Publish\\standard.js

Personally I use a custom js file and put the include in the template file. C:\Program Files\Adobe\Adobe Captivate 8 x64\Templates\Publish\standard.htm (non-scorm) or

C:\Program Files\Adobe\Adobe Captivate 8 x64\Templates\Publish\LMS\Standard\SCORM\Default\1_2\default,htm (SCORM)

Can you put an alert in the openBrWindow function to see if it's being called?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources