Featured Categories
-
Lectora®
Lectora® is the most trusted authoring tool in the world. Rock out your creativity! Author courses any way you like. Lectora adheres to best practices for Accessibility and Web Content Accessibility Guidelines (WCAG), offers responsive authoring for eLearning, and publishes to any LMS (Learning Management System).
-
CenarioVR®
Experience virtual reality through CenarioVR®, our training and virtual reality (VR) authoring software that allows you to create immersive learning in minutes! No coding required!
-
Rockstar Learning Platform®
Our Rockstar Learning Platform® has all the features you’ll love. Help your employees be better at their jobs, more valuable to your company, and most effective in servicing your customers.
-
The Training Arcade®
Level up your learner engagement with the Training Arcade®! The Training Arcade is a library of fun, mobile-ready, casual games that can be rapidly customized with your content to create effective gaming!
-
ELB Learning Content
Did you know that our AssetLibrary™ has over 120 million engaging, interactive, and awe-inspiring templates and assets to help you become an eLearning Rockstar®?
a001index and URL Variables

So I am playing with the notion of using a user's specific geolocation based on one of the many APIs out there. I got it working nicely in a test module but when we went to a regional test it all appeared to come out of one location - which makes sense because of our network infrastructure.
While poking through the developer tools of the web browser, I noticed that our LMS is sending URL level variables on the module's first load. For example:
https://<myLMSdomain>/foo/bar/en/Andrew/a001index.html<b class="Bold">?localserver=ABCD</b>
Is there anyway to pull that variable using a script inside of Lectora software (e.g. JavaScript action) or must I be inserting my JavaScript code into the a001index.html file and passing the variable through client side storage.
Developing content since 2010 using a mixed bag of tools.
Answers
-
Yes, essentially you could have Lectora load a script to capture that data and assign it to a variable, then you would be able to access that variable in Lectora.0
-
Great thank you @nmaharaj , however, how do I put that reference in the a001index.html file? I cannot find out where to put it.Andrew R.
Developing content since 2010 using a mixed bag of tools.0 -
Bump. Sorry to be one of those guys. Is there any way to add stuff to the a001index.html file without actually having to publish, extract the zip, edit the a001index.html file, and then recompress the package?Andrew R.
Developing content since 2010 using a mixed bag of tools.0 -
wheels Community Member, Administrator, Moderator, Rockstar Manager Posts: 695 eLearning ROCKSTAR Admin TeamTry adding a title level On Show -> Run JavaScript action to fill a variable called ServerLocation
// assuming you have a Lectora Variable named ServerLocation
var urlParams = new URLSearchParams(myTop.location.search);
if (urlParams.has('localserver'))
VarServerLocation.set(urlParams.get('localserver'))
1 -
I'll give this a whirl and report back.Andrew R.
Developing content since 2010 using a mixed bag of tools.0
Categories
- 35.9K All Categories
- 110 ✫ Announcements
- 33.1K Lectora®
- 31.1K Lectora Discussions
- 29K Lectora Desktop
- 2K Lectora Online
- 2K Lectora Feature Requests
- 71 Lectora User Groups
- 27 ELB Learning Content
- 27 ELB Learning Content Discussions
- 343 CenarioVR®
- 204 CenarioVR Discussions
- 139 CenarioVR Feature Requests
- 44 Rockstar Learning Platform®
- 41 Rockstar Learning Platform Discussions
- 108 CourseMill®
- 108 CourseMill Discussions
- 48 ReviewLink®
- 48 ReviewLink Discussions
- 7 The Training Arcade®
- 7 The Training Arcade Discussions
- 938 All Things eLearning
- 39 eLearning Development
- 546 Learning Management System (LMS) Integration
- 333 Web Accessibility
- 1.2K ♪ The Green Room
- 9 Additional Learning Products