Javascript does not work from LMS in IE
May 5, 2016 12:00 AM
I have Javascript to find the folder name of the course and place the title based on the course foldername. It works if I drag and drop to IE browser window. If I launch it from LMS (Pathlore), IE can't pick up the name while Chrome picks up the name fine. Unfortunately, IE11 is the default browser in the company I work for so I have to make it work in IE launched from LMS.
undefined
var totalLength = theURL.length
var theFolderLocNum = totalLength - 2
var courseCode = (theURL[theFolderLocNum]);
VarcourseFolderLt.set(courseCode)
//document.write(courseCode);
//document.write(VarcourseFolderLt);
undefined
Discussion (4)
Try:
undefined
var theFolderLocNum = totalLength – 2;
var courseCode = (theURL[theFolderLocNum]);
VarcourseFolderLt.set(courseCode);
undefined
G'day cpliu,
Try:
var theURL = window.location.href.toString().split(‘/’);
HTH
Regards, Peter
Thank you all for correcting my Javascript. With correction, it still can't show the right title when the course is loaded in IE11 while it works when loading the page on its own. It works fine with Chrome too (both http and LMS). Eventually I had it working with Lectora 16.
Discussions have been disabled for this post