Archive for the ‘HTML/JavaScript’ Category

Launching Expression Web 4 automatically

Thursday, July 29th, 2010

In one of our authoring tool projects, we need to launch the newest version of Expression Web on the author’s computer. When an author had ExpressionWeb 3 and 4 installed on the computer, our code was always launching Expression Web version 3 instead of version 4. The problem was not in our code – the problem was in the registry settings created by the Expression 4 installation. The installation of Expression Web 4 leaves does not update the registry setting responsible for launching the application by its name (ExpressionWeb.exe). You can change the registry setting by creating a .reg file (see contents below) and then launching that .reg file.

The first line of the .reg file must contain Windows Registry Editor Version 5.00. Save the .reg file as a Unicode file using notepad.

Here are the contents of the .reg file:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ExpressionWeb.exe]
@=”C:\\Program Files (x86)\\Microsoft Expression\\Web 4\\ExpressionWeb.exe”
“Path”=”C:\\Program Files (x86)\\Microsoft Expression\\Web 4\\”

Getting ready to launch the e-Learning Authoring Tool

Thursday, February 25th, 2010

We have been working on a new e-Learning Authoring Tool for quite a while. Our goal was to create a tool that makes it very easy to create the most common types of courses and also allowing power-authors to extend to tool to create all types of courses. You can learn more about the new tool at the e-Learning Authoring Tool product page.

Our goal with the authoring tool was to provide all of the features you would expect in a clean, easy to use interface. The features include information pages, questions, quizzes and tests. The information pages are created with a built-in HTML editor so your course can contain all of the elements from a good web site including rich text, multimedia, tables and more. There are also built-in editors for questions, quizzes and tests.

We very interested in your feedback on this new authoring tool. Please comment in the blog or send us your comments by email.

Aligning movies in the Flash Toolkit

Wednesday, October 1st, 2008

Our Flash Course Development Toolkit uses a JavaScript function to insert the Flash movie into the HTML page. This function is currently set to center the Flash movie in the HTML page. You can pass the salign:”L” parameter to left-align the movie:

var FO = { movie:”player.swf”, width:”100%”, height:”100%”, salign:”L”, majorversion:”8″, build:”0″, id:”ufoCom”, name:”ufoCom”, swliveconnect:”true”, allowscriptaccess:”always”, setcontainercss:”true” };

SCORM 2.0

Thursday, August 14th, 2008

LETSI is a new organization working on the future of SCORM. LETSI had a call for white papers that asked members of the e-learning community for the best ideas for a future version of SCORM called SCORM 2.0. I submitted a paper called SCO 2.0: The Lucas Proposal – SCO-based Sequencing. The white paper proposes that we eliminate simple sequencing and replace it with SCO-based sequencing.

Simple sequencing sound simple but its not. Simple sequencing is the SCORM 2004 way to define how a learners interaction will the SCOs in the course will affect navigation, completion, success (pass/fail) and the score of the course. Simple sequencing is described in a 250 page specification. The specification is a tough read and it is difficult for most developers to use to create real courses.

I am proposing a much simpler solution called SCO-based sequencing. The LMS launches just one SCO for a course. That SCO can launch child SCOs if needed. The parent provides a SCORM runtime API to the child SCOs so it can receive all of the information provided by the child. For example, the child tells the parent that the learner has completed the SCO with a passing score of 90. The parent SCO can use the information provided by the child to make sequencing decisions.

SCO-based sequencing allows a course to be in full control over its user interface. Course developers will not have to worry how their multi-SCO will look and behave in different LMSs. Learners will not be confused by 2 sets of navigation (one provided within a SCO and another by the LMS).

SCO-based sequencing has other advantages. It allows a multi-SCO course to be developed in other web languages such Flash and Silverlight.

Please post comments to the white paper on the LETSI web site.

IE patch eliminates click to activate

Friday, May 16th, 2008

Microsoft has released a patch for Internet Explorer that eliminates the click to activate message that you used to get when you clicked on an ActiveX control (examples: Flash and Windows media). The patch has been available for several months so it all of that ActiveX insertion code can finally go the way of the dinosaur.

Automatically scrolling a div containing divs

Friday, August 17th, 2007

I have a table-of-contents in  a course. The table of contents is a <div> that contains other <div>s. The table of contents can have so many items that it requires scrolling. I also have previous/next buttons that can switch from one item in the table-of-contents to the next. I had to make sure the current-item is always scrolled into view.

 The first part of this solution is to find the Y position of an item within the table of contents. I found a great public-domain function from firetree (the original code is from quirksmode).

Now, I had to write the scrolling code:

 // get the id of the TOC container
 var oSections = document.getElementById(‘tocContainer’);
 
 // get the y position of the TOC section container
 var nSectionsY = findPosY(oSections);
 
 // get the y position of the selected item
 var nItemY = findPosY(document.getElementById(sItem)); 
 
 // adjust the item height to be in the coordinate space of the container
 nItemY -= nSectionsY;
 
 // get the height of the container and pull off the “px” part on the end
 var nHeight = parseInt(oSections.style.height);
 
 // see if the complete item is greater than the height of the container
 if ((nItemY+21) > nHeight) {
  // it is, scroll the selected page into view
  oSections.scrollTop = nItemY;
 } else {
  // see if the item is showing given the current scroll position
  if (oSections.scrollTop > nItemY) {
   // it is not, scroll the item into view
   oSections.scrollTop = nItemY;
  }

Running JavaScript on your local computer

Monday, January 15th, 2007

Windows XP SP2 and Windows Vista will not let you run JavaScript from your local hard drive or CD-ROM. This restriction can make it difficult to distribute interactive web pages for use on a local computer. When you launch a HTML page with JavaScript on your computer, Internet Explorer 6 and 7 will tell you that the page contains Active Content. You have to authorize the page to run “Active Content” each time it is loaded or you have to change the default settings in “Internet Options…”

Microsoft has provided a work around for this problem. The HTML author can add the “Mark of the Web” (MOTW) to each HTML document. The MOTW is a comment line included in the HTML code. Here is a sample:

<!-- saved from url=(0014)about:internet -->

Creating a SCO with a HTML Frameset

Thursday, January 4th, 2007

Here is the general way to create a SCO using a HTML frameset.

Your frameset will contain some or all of the code for your SCO. Your frameset will have the code to get and set the bookmark. Your frameset can also have the code to set the completion status, success status, score and other SCORM data items. Your frameset will contain at least one frame. You will display the content (HTML pages) of your SCO in a frame.

The frameset will initially display a blank page when it is loaded. Your frameset displays a blank page because it has to find out if this is the first time the learner has launched the SCO. If this is the first time the SCO is launched, the frameset will load the first page in the SCO into the frame. If the SCO has been launched at least once, your frameset will get the bookmark (previously saved by your SCO) and then use that bookmark to load the correct page.

In a SCORM 2004 SCO, your frameset can save the bookmark information in cmi.location or cmi.suspend_data. In a SCORM 1.2 SCO, your frameset can save the bookmark information in cmi.core.lesson_location or cmi.suspend_data. You will decide what kind of information to store in the bookmark. For example, you could store the name of the file that was previously viewed by the learner. You could also store a number that could be an index to an array of pages that you load when the SCO is launched.

We have created an e-learning toolkit that uses a frameset to manage bookmarks within a SCO. The toolkit comes with source code that you can use “as is” or modify to meet your specific needs.