Javascript from an imported package

mnotermans5114
Community Member Posts: 916 ☆ Roadie ☆
Hi,
I made a L11 with quite some Javascript. In preview mode and published as html in L11 it works as expected. Now exported that title as package. Next step importing it in L12 online. All the assets, graphics groups and actions, including the additional JS-files are all nicely added. But the javascript doesnot work??
Anyone any clues to what i might be missing ?
I made a L11 with quite some Javascript. In preview mode and published as html in L11 it works as expected. Now exported that title as package. Next step importing it in L12 online. All the assets, graphics groups and actions, including the additional JS-files are all nicely added. But the javascript doesnot work??
Anyone any clues to what i might be missing ?
Comments
-
Hi sergey, both are used. Actions are properly present. All imported js libraries too... The scripts themselves are fine too... Only thing different is that in L11 i use 'Custom div' and that gets converted to 'other' ( have to doublecheck that, cause i now am at a clients )... So actually the same issue as in the other post i did. Lack of 'custom div' i might be overseeing something simple though....
-
Interesting. Seems like "Other" is Lectora Online's name for "Custom DIV" after all. However, since it is all wrapped in DIVs in the middle of the page, scripts might not always work. Try setting it to META TAGS and make sure the script is wrapped in script tags and no errors are reported in developer console in your browser.
Also, feel free to share the files with me so I can have a look. -
-
@ Sergey, changed my coding habits to use Metatags. And indeed that solves some issues when importing a project from L11 to Lectora Online or L12.
But one issue remains, but i guess thats easy to solve by refactoring my code a bit ( should not be needed, but well if this is all thats needed to get it to work ;-)
In L11 i call ( as you can see in the OOP sample i uploaded ) images and texts in Lectora by using:
#image321363 or $('.text322541Font1') or #text322548
In L11 either using JQuery or DOM , both methods work fine.
L12 and Lectora Online however have changed the convention they used for their html-names. Now they are called:
tobj321363 or tobj322541 or tobj322548.
Can someone confirm that for me ? If thats true just a refactoring of my code when exporting to L12 or Online will do. -
Update on my own reply:
Yes, indeed the convention of htmlnames changed.
Tested the #image321363
Changed my javascript to use 'tobj' instead of 'image' and indeed all image-related elements work as before.
Too bad they skipped the 'text' part in textobjects, because i used that to detect something was a text ;-)
Well, will find another solution for that for sure ....
Thanks Sergey for the 'Metatags'-part
Categories
- 35.9K All Categories
- 109 ✫ Announcements
- 33.1K 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)
- 25 ELB Learning Content
- 25 ELB Learning Content Discussions
- 328 CenarioVR®
- 195 CenarioVR Discussions
- 133 CenarioVR Feature Requests
- 42 Rockstar Learning Platform®
- 39 Rockstar Learning Platform Discussions
- 108 CourseMill®
- 108 CourseMill Discussions
- 47 ReviewLink®
- 47 ReviewLink Discussions
- 7 The Training Arcade®
- 7 The Training Arcade Discussions
- 936 All Things eLearning
- 37 eLearning Development
- 546 Learning Management System (LMS) Integration
- 333 Web Accessibility
- 1.2K ♪ The Green Room
- 9 Additional Learning Products