Html names of Action groups

mnotermans5114
Community Member Posts: 916 ☆ Roadie ☆
Lately working more and more in Lectora Online. Figured out quite a few changes in how LO uses Javascript.
One thing i would love to figure out is how to detect the html-name of an actiongroup on runtime. I dont want it hardcoded in my code... i want to use something like %HTMLNAME% to detect what the HtmlName of my actiongroup is. Offcourse i cannot add an action to it..because it will be called by some HtmlName.
In LO now this will call a specified actiongroup...
og155247.issueActions(1001); // Runs some ActionGroup
In LO i can see the htmlName...being og155247..
But how to replace that, so its generic..and when copied will use the new Htmlname ???
One thing i would love to figure out is how to detect the html-name of an actiongroup on runtime. I dont want it hardcoded in my code... i want to use something like %HTMLNAME% to detect what the HtmlName of my actiongroup is. Offcourse i cannot add an action to it..because it will be called by some HtmlName.
In LO now this will call a specified actiongroup...
og155247.issueActions(1001); // Runs some ActionGroup
In LO i can see the htmlName...being og155247..
But how to replace that, so its generic..and when copied will use the new Htmlname ???
Comments
-
wheels Florida USACommunity Member, Administrator, Moderator, Rockstar Manager Posts: 665 eLearning ROCKSTAR Admin TeamBecause group objects do not have #HTMLNAME# it isn't easy to get their HTML object. I promise we will do something soon to make this easier for this and for executing action groups in general.
I have attached a script that I use sometimes to abstract objects from their HTML name to a known name which is more portable. This is my personal script which I'll try to find a better way to implement in the product. I would like the html name to be based off of the object name, or customizable. If you have any ideas about this I'm listening.
Hope the attached script helps you. (remove the .zip extension and import as a Lectora Online PKG file)
-
-
Tested it and it works perfect. Now i can make my more complex pages in Lectora Online completely reusable. Tried copying one i am working on now with a lot of variables, actiongroups and Javascript...and works as desired. Any other ( less Javascript minded ) developer now can just copy and paste my pages and they work without having to dive deep into the Javascript.
Thx Joe.
Kind regards,
Math -
wheels Florida USACommunity Member, Administrator, Moderator, Rockstar Manager Posts: 665 eLearning ROCKSTAR Admin Team
-
Yeah i know. Found quite a lot of differences in working with Javascript in LO compared to Inspire or Publisher, but must admit that although i was sceptical about LO untill recently, now working a lot with it, i especially do like the option you can share work easily. And now with your little trick, i can make almost anything good reusable for my teammates.
A few things i would love if that could be improved/changed, will be listing them soon...
Categories
- 35.8K All Categories
- 109 ✫ Announcements
- 33.1K Lectora®
- 31.1K Lectora Discussions
- 28.9K Lectora Desktop
- 2K Lectora Online
- 2K Lectora Feature Requests
- 71 Lectora User Groups
- 36 Lectora Accessibility User Group (LAUG)
- 22 ELB Learning Content
- 22 ELB Learning Content Discussions
- 321 CenarioVR®
- 188 CenarioVR Discussions
- 133 CenarioVR Feature Requests
- 41 Rockstar Learning Platform®
- 38 Rockstar Learning Platform Discussions
- 108 CourseMill®
- 108 CourseMill Discussions
- 47 ReviewLink®
- 47 ReviewLink Discussions
- 7 The Training Arcade®
- 7 The Training Arcade Discussions
- 934 All Things eLearning
- 36 eLearning Development
- 546 Learning Management System (LMS) Integration
- 332 Web Accessibility
- 1.2K ♪ The Green Room
- 9 Additional Learning Products