a001index and URL Variables

andrew-robertson Community Member Posts: 85 ♪ Opening Act ♪
Hello Rockstars,

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.


  • nmaharaj
    nmaharaj Moderator Posts: 7 eLearning ROCKSTAR Stage Manager
    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.
  • andrew-robertson
    andrew-robertson Community Member Posts: 85 ♪ Opening Act ♪
    Great thank you @nmaharaj , however, how do I put that reference in the a001index.html file? I cannot find out where to put it.
Sign In or Register to comment.

So You Wanna Be An eLearning ROCKSTAR?

We're all fans of eLearning here! Want to become an eLearning ROCKSTAR? Just click on one of the buttons below to start your rocking journey!