- ELB Learning Knowledge Base
- Lectora®
- Programming
-
Lectora®
- Quick Win Tutorials
- Getting Started
- Modular Development (ModDev)
- Quick Guides
- Best Practices
- Navigating the Workplace
- Building a Title
- Importing Content
- Working With Text
- Working with Images
- Working With Objects
- Actions and Variables
- Tests, Surveys, and Questions
- Working with Web Windows or HTML Extensions
- Publishing a Title
- Creating Web-based, Accessible Content (Section 508/WCAG)
- Lectora Layouts
- Managing Titles
- Managing your Assignments
- Managing Your Notifications
- Communicating
- Admin Guide
- Lectora Player Skins
- Lectora Interactions and Scenarios
- Games
- Misc.
- Programming
- General
- Using Tracking for Progress, Status, etc
- Working with BranchTrack
- Trouble Shooting
- Working with Audio and Video
-
CenarioVR®
-
The Training Arcade®
- Arcades™
- Video Overviews
- FAQ's
- Recent Feature Videos
- Game Analytics
- Customer Feedback
- Demo Information
- General Admin
- Building Your Game
- Analytics
- Compatibility and Integrations
- Data, Security, and Privacy Policy
- JEOPARDY!®
- Jump
- Scenarios
- Trivia
- Trivia Virtual Instructor-Led Mode (VILT)
- Sort-It
- Scramble
- Recall
- Match
- Detective
- Translations
- New User Information
- Custom Branding Opportunities
- Registration and Leaderboard
- JEOPARDY!® Virtual Instructor-Led Mode (VILT)
-
MicroBuilder™
-
Asset Libraries
-
Rockstar Learning Platform
-
Rehearsal
-
Off-the-Shelf Training
-
ReviewLink®
-
The Learning Creation Studio
-
CourseMill®
-
General Topics
-
xAPI
-
Template Styles
-
Misc.
-
Articulate Storyline
-
Customizable Courseware
-
Course Starters
-
Camtasia
-
Group Administration
-
General
-
Can't find the answer? Ask our Customer Solutions team.
In Lectora Online how can I run an Action Group from JavaScript?
For Lectora Online do this to run Action Groups from JavaScript.
1. Add an On Show - Run JavaScript Action to your page. Name it "Define Lectora Group Objects". This is going to create JavaScript variables that map to the Action Group that have a prefix of LGO in their name. (ie. LGO_MyActionGroup).
This is the code to add to the Run JavaScript action:
// set whatever prefix you want to use for object names that will map to their HTML object
var objectPrefix = "LGO"; // Lectora Group Objects
var chlds = document.head.childNodes;
for (var i=0;i<chlds.length;i++)
{
if (chlds[i].tagName && chlds[i].tagName.toLowerCase().indexOf('script')>-1 &&
chlds[i].innerHTML && chlds[i].innerHTML.indexOf('trivWeb20Popups')>-1 )
{
var re = new RegExp("var\\s*([^\\s]*).*//("+objectPrefix+"[^\\s]*)",'g');
var s = chlds[i].innerHTML;
s.replace(re, function(match, g1, g2) {
window[g2] = window[g1];
window[g2].runme = function(){this.issueActions(1001);};
});
}
}
2. Name Action Groups you want to run with the prefix you used. (ie. LGO_MyActionGroup)
3. In Run JavaScript actions you can now run your action groups by specifying the <name>.runme();
LGO_MyActionGroup.runme()
See the example below:
This only works in Lectora Online.