Kingsley eLearning Solutions

You have big dreams for your eLearning.
We'll make them come true.

image of Kingsley

Future Proofing Multiple Course Links

Submitted by Kingsley 👑 on Tue, 02/14/2012 - 14:11

This is an update to my last post Future Proofing Course Links and like that solution this will work with any tool (captivate, articulate, lectora, etc) David liked my solution but didn't want to maintain dozens of html files. This solution uses a bit more JavaScript and allows you to pass a keyword to it. This way we can use one HTML page with some logic built into it. I will record a screenr to demostrate this also but here are the basic steps. First we will create a blank HTML page Create a basic HTML file..

<html> <body> </html> </body>

Then add a few lines of JavaScript to catch our "subject" and create the redirect.

<html> 
 <body> 
  <script type="text/javascript"> 
     var subject = document.location.search.substr(1); 
     var site 
     switch (subject) { 
        case "widgets": 
          site = "https://elearningenhanced.com/catalog/articulate" 
        break; 
        case "services": 
           site = "https://elearningenhanced.com/services" 
        break; 
        default: 
           site = "https://elearningenhanced.com" 
     } 
     window.location = site 
   </script> 
  </body>
</html> 

You would want to replace terms "widgets" and "services" with terms that make sense for your courses. Also change the links. You can add more terms if you need to. The last bit within the switch statement provides a default URL just in case no term was passed to our page for some reason. Save your file as redirect.html and place it on your server. In your course create a link to yourserver.com/redirect.html?widgets or yourserver.com/redirect.html?services etc. Now when the student clicks the link they will go to your HTML page that will look for the term at the end of the URL and automatically forward them to the matching site. It happens very fast so they wont know it. Now if later you want to change any of the links you can just edit that one file! View the screenr to see it in action:

Comments

Add new comment