Explore the community Forums Lectora Lectora Questions & Answers Entry Field Java Script Alters format of my Course

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #344316 Score: 0
    Profile photo of mcofield_08
    mcofield_08
    Member
    beginner
    intermediate
    curious george
    wise owl
    contributor
    @mcofield_08

    Hi,

    Just new to Lectora 17, and creating a test Responsive course. When I add and entry field, and use Java Script to send focus to the Entry Field, the course alters its format when published (Either to Review Link or HTML). Some things on the right side of the course appear now on the right, some items are displaying at the top of the screen that aren’t supposed to be there. When I preview in IE/EDGE etc, all appears fine. But not published.

    When I remove the below script or the action that runs the script, the format of the course is fine.

    document.getElementById(“entry270id”).focus()

    Thoughts????

    Thanks for the help!

    Mark

    #344339 Score: 0
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    168 pts
    @timk

    The difference between “Preview in Broswer” and default “Publish to HTML” is “Publish for Seamless Play”. If you unchecked it, it should work.

    #344341 Score: 0
    Profile photo of mcofield_08
    mcofield_08
    Member
    beginner
    intermediate
    curious george
    wise owl
    contributor
    @mcofield_08

    Thanks Tim,

    That did work!

    Any idea “why” this publishing feature would be causing this kind of issue?

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

    Ahh, I’m having similar strange issues with Javascript when published to Seamless Play.

    As far as I can tell, Seamless creates a couple of extra files in your published package, namely:

    – trviantis-opautils.js
    – trivantis-plageplayer.js

    I suspect these files change some fundamental aspects of how the pages are set up and displayed, which may be confusing our additional scripts.

    #344418 Score: 1
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    168 pts
    @timk

    The pages are somehow displayed in iframes to allow faster page changes and smoother transitions. In the introductoy video it’s mentioned that you can uncheck it, if you use “advanced scripting” that may not work. Not sure, how the term “advanced” is defined.

    This post has received 1 vote up.
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.