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®?
Scrolling Text DIV [JPG Form, TEBs, Radios, CheckBoxes, Feedback Elements

About this Test Project: Training usually requires that the users learn how to complete long data forms. Therefore, need to incorporate a visual of the form (high res JPG); superimpose on it many (could be upwards of 40 per page) text-entry-boxes, radio buttons, checkboxes, dropdowns, etc. [This is an adapted project from one I'm working on at work. I've stripped out the "live" content and replaced it with lorem ipsum. The word doc attached includes all of my questions as well as snips of the HTML Extensions.]
Current Method
- At the Title Level: script uses a link to the latest jQuery on web via the HTML Extension; another to attach mauraReflow.js; another for custom css.
- Is this a bad way to do this? I notice that some people have been pasting in the minified jQuery here instead. What are the pros/cons?
- At the Page Level (Scrolling Example) run JS onShow:
- Detach the Form (class=form) and append it to my scrollTextDIV (class) which is for a text block called “toScroll” in the Title Explorer and is set for Vertical Scroll
- Use jQuery to reposition the form within the scrollTextDIV;
- Use jQuery to set overflow-x to hidden for scrollTextDIV;
- Find, detach, and append all classes (teb, rad, chk, msg) to scrollTextDIV using jQuery
- Run whichPage(“pg4a”) to then work through a set of if statements and call up the page specific function for each page. These functions then reposition all of the input and error messages using inelegant JavaScript.
- I’d like to get to the point of looping to do this (automatic capture of current position and recalculation on new position) and have this so far:
- var arrayTEB = [];
$(".teb").each(function() { arrayTEB.push(this.id); });
console.log(arrayTEB);
var numTEB = arrayTEB.length;
console.log("Number of textEntryBoxes = " + numTEB); - var arrayRAD = [];
$(".rad").each(function() { arrayRAD.push(this.id); });
console.log(arrayRAD);
var numRAD = arrayRAD.length;
console.log("Number of radioButtons = " + numRAD); - var arrayCHK = [];
$(".chk").each(function() { arrayCHK.push(this.id); });
console.log(arrayCHK);
var numCHK = arrayCHK.length;
console.log("Number of checkBoxes = " + numCHK); - var totalInputs = arrayTEB.concat(arrayRAD, arrayCHK);
console.log(totalInputs);
var length = totalInputs.length;
- var arrayTEB = [];
- Previewing in Browser: In either IE or Chrome the JS and jQuery works fine although at the office, for IE, I must: allow scripts > F12 > Choose 10 instead of 11 to get the page to display. Why?
- Review Link: I tried to test the project in Review Link last night from home. (I have version 2017 at home, but it has not yet been installed at work). None of the JS/jQuery worked. Is it disallowed? If not, what could be the problem? Is this because I didn’t use the minified code in my HTML Extension?
- Publish to HTML: When I published (from home since I have 2017 there, but not yet at work) and tried to preview it from the dialog box that came up, JS/jQuery were not working properly. Is this because I didn’t use the minified code in my HTML Extension?
Comments
-
I just quickly checked your doc and 1 big difference L17 has from L16 is the 'seamless play'.
Due to the fact that is in Lectora 17 Lectora now uses iFrames, so quite a lot of Javascript needs to be revised to work properly in L17.
One big difference i noted immediately when reading your readMe is the use of 'pageDiv' in your Javascript. That worked fine in L16, but is gone in L17.
I know there is info online somewhere ( from Jennifer i think ) about the exact calls to access the page now. I probably have it in my shared content too somewhere, but cannot find it quickly ;-)
regards,
Math -
-
Thanks for the responses so far!
Any tips on improvements to my "wordy" JavaScript?
I'm trying to work on a function that will build a multidimensional array of the IDs automatically and then relocate all inputs via a loop, but have not gotten the logic right just yet.
Also, is there anyway to add the radio buttons and check boxes to the tab order that I've fixed via JS? I'd like it to work more like standard web-based forms in that you tab into the group and can use the spacebar to select an item if you like rather than use the mouse. -
-
-
-
Categories
- 35.9K All Categories
- 110 ✫ Announcements
- 33.2K Lectora®
- 31.1K Lectora Discussions
- 29K Lectora Desktop
- 2K Lectora Online
- 2K Lectora Feature Requests
- 71 Lectora User Groups
- 36 Lectora Accessibility User Group (LAUG)
- 27 ELB Learning Content
- 27 ELB Learning Content Discussions
- 346 CenarioVR®
- 205 CenarioVR Discussions
- 141 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