Explore the community Forums Lectora Lectora Questions & Answers V10 course republished in 17: doesn't work. Also JS.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #385808 Score: 0
    Profile photo of CarlFink
    CarlFink
    Member
    beginner
    intermediate
    contributor
    LUC16 Attendee
    wise owl
    curious george
    advanced
    22 pts
    @CarlFink

    So I have a course that was done by a third-party developer years ago in Lectora Publisher 10. He/she apparently wasn’t very comfortable with Lectora, because a lot of very basic functionality seems to be in external JavaScript files, instead of Lectora itself. For instance, closed captions are displayed using JS to create a Div, format it extensively with HTML tags, and then show or hide it–the original developer didn’t even feel comfortable using Lectora hide and show actions, it’s all done via JS.

    Some functionality has broken with versioning. If I publish it from V17.0, the closed captions don’t display at all. If I publish from V16, the closed caption box displays but contains no text, just “Undefined”. Was there a change in JS handling between those versions?

    Audio is also played by the JS. Well, in Internet Explorer it is. In Chrome the audio never plays.

    I doubt anyone can help me actually fix this. (For one thing due to confidentiality I can’t upload the course.) I’m just wondering if anyone has tips or advice. I’m inclined to just refactor the entire course myself at this point rather than debug someone else’s JavaScript, which isn’t needed in the first place.

    Thanks.

    #385825 Score: 0
    Profile photo of Cam Phillips
    Cam Phillips
    Member
    beginner
    intermediate
    friend finder
    wise owl
    curious george
    contributor
    19 pts
    @_

    Hi Carl,

    I know ‘Publish to Seamless Play’ can cause havoc with Javascript – do you have this enabled in L17?

    Cheers,

    Cam

    #385837 Score: 0
    Profile photo of CarlFink
    CarlFink
    Member
    beginner
    intermediate
    contributor
    LUC16 Attendee
    wise owl
    curious george
    advanced
    22 pts
    @CarlFink

    Cam, I tried it both with and without Seamless Play, and as I said I also tried V16, which doesn’t even have SP.

    #385842 Score: 0
    Profile photo of Math Notermans
    Math Notermans
    Member
    contributor
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    LUC16 Attendee
    LUC16
    wise owl
    curious george
    118 pts
    @mnotermans5114

    Besides from SP in Lectora 17 quite a few differences with Javascript. If you dont fix those, JS seldom will work. Most notable is any reference to ‘document’ or ‘pageDiv’ will fail in Lectora 17. All Javascript need to use the functionality as described in this document to work in 17

    Containing your containers: Custom JavaScript Suggestions for Lectora Online


    Kind regards,

    Math

    #385847 Score: 0
    Profile photo of Math Notermans
    Math Notermans
    Member
    contributor
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    LUC16 Attendee
    LUC16
    wise owl
    curious george
    118 pts
    @mnotermans5114

    One more thing remembering from my own Lectora X10 days… because in Lectora you couldnot easily set a class to a specific element, that needed to be done in Javascript… that too might cause problems when going from 10 -> 16 and up. CSS classes were only introduced in version 12 if im not wrong. I actually do have several X10 courses i converted and published without big issues to v16…

    #386767 Score: 0
    Profile photo of CarlFink
    CarlFink
    Member
    beginner
    intermediate
    contributor
    LUC16 Attendee
    wise owl
    curious george
    advanced
    22 pts
    @CarlFink

    Math, I got involved in other projects and just got back to this, so let me tardily say: thank you very much.

    #386850 Score: 0
    Profile photo of CarlFink
    CarlFink
    Member
    beginner
    intermediate
    contributor
    LUC16 Attendee
    wise owl
    curious george
    advanced
    22 pts
    @CarlFink

    I don’t suppose anyone has an example using getCurrentPageDiv()? When I publish the course and watch JS execution in the browser console, the interpreter complains that

    cc_text_code.js:125 Uncaught ReferenceError: getCurrentPageDiv is not defined

    The relevant code is:

    getCurrentPageDiv().innerHTML += html ;

    Where “html” is a variable containing the HTML required to draw a Div containing the closed caption for the current page.

    All help appreciated.

    #386981 Score: 0
    Profile photo of Joe Wieloch
    Joe Wieloch
    Moderator
    beginner
    intermediate
    friend finder
    contributor
    LUC16 Attendee
    verified member
    wise owl
    LUC17 Attendee
    advanced
    picture perfect
    51 pts
    @wheels

    If you are working in Lectora Desktop and are not on the latest version, they use C++ format rules for the functions (which means an uppercase first letter).

    Try GetCurrentPageDiv() instead, and this will be true for the other API calls as well.

    #386983 Score: 0
    Profile photo of CarlFink
    CarlFink
    Member
    beginner
    intermediate
    contributor
    LUC16 Attendee
    wise owl
    curious george
    advanced
    22 pts
    @CarlFink

    Capitalization is the issue? Because Lectora Desktop doesn’t match the only (very sketchy) documentation?

    #387028 Score: 0
    Profile photo of Math Notermans
    Math Notermans
    Member
    contributor
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    LUC16 Attendee
    LUC16
    wise owl
    curious george
    118 pts
    @mnotermans5114

    My own default setup for Lectora 17 ( v.17.0.6 i still use , cannot guarantee it works in the last updates, cause read so many issues with those ). Works fine in seamless too.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.