Lectora Online 4.2, fullscreen and Javascript...

mnotermans5114
mnotermans5114 Community Member Posts: 916
This weekend LO 4.2 got released and im at loss how to get my Javascripts working in 4.2

So i got a title published, without seamless it finds my JS fine and works as desired.. when using Seamless Play...the JS cannot access the page anymore ? Is this a bug or am i missing anything? The same code did work before 4.2

Regards,

Math

Comments

  • mnotermans5114
    mnotermans5114 Community Member Posts: 916
    As extra note ( not sure whether that was before or is new in 4.2 ) i am noticing a lot of 'layering' of divs and iframes in Lectora Online published content. I am sure that thats causing my issues, especially because i am using 'fit to width' and the fullscreen options in Docebo...Testing my title in Lectora Online preview all works perfectly. Running it in the LMS..the Javascript fails...
  • wheels
    wheels Community Member, Administrator, Moderator, Rockstar Manager Posts: 530 eLearning ROCKSTAR Admin Team
    When you say Lectora Online preview do you mean Preview Page, or Publish Preview (after publishing).  Also do you use the methods described in the help which are necessary to reference the SPP display window and document?  If you can post an example of a script that doesn't work I'd be happy to look into it!
  • mnotermans5114
    mnotermans5114 Community Member Posts: 916
    Basically i am using the approach listed in the help. Im gonna doublecheck it against the help... see whether i miss something and either get you a sample .pkg and/or response on issues or fixes found.

    Some extra info... previewing i meant: Page Preview. Publishing as scorm, and then previewing it doesnt work either. I am aware of Page Preview not being real browserbased.. checking my file now...
  • mnotermans5114
    mnotermans5114 Community Member Posts: 916
    Well.. i use JQuery for selection. Got classes set on all major elements to easily access them.
    In my original i used it as this
    var tocElement = $('.tocClass');

    That works fine when dont using SPP.

    However when SPP is on this wont work.
    So reading the Help i changed it into this.
    var tocElement = $('.tocClass',getDisplayWindow());

    Alas that didnot work either...
  • mnotermans5114
    mnotermans5114 Community Member Posts: 916
    Thx Joe figured it out...  this worked...

    var tocElement = $('.tocClass',getDisplayDocument());

     
  • wheels
    wheels Community Member, Administrator, Moderator, Rockstar Manager Posts: 530 eLearning ROCKSTAR Admin Team
    Great job, sorry for the misleading info in the help, we will get that corrected.

    @tleone4566 please correct the help link referenced above in LO & LD.
  • mnotermans5114
    mnotermans5114 Community Member Posts: 916
    @Joe and @tleone4566 i am not sure whether the help is incorrect. Depending on the developers specific needs i do think getDisplayDocument() or getDisplayWindow() might both be correct. I do think however there should be more samples and info for all users beginning and experienced on this kind of subjects. At some point i suggested writing 'Best of' or Cookbook with several experienced users. I do think this might be the time to get something like that started.
  • wheels
    wheels Community Member, Administrator, Moderator, Rockstar Manager Posts: 530 eLearning ROCKSTAR Admin Team
    I feel the use of document would be the most frequent use case for readers of the help, maybe we make that the first example and also state in some cases they might need to use getDisplayWindow() although I cannot think of any such example at the moment (when providing a context to jQuery).

    We are starting an effort to do document the object model and scripting best practices and examples.  I will include you. If you know of anyone else please have them contact me through the forum here.  Thanks.

    - Joe

     

     

     
Sign In or Register to comment.

So You Wanna Be An eLearning ROCKSTAR?

We're all fans of eLearning here! Want to become an eLearning ROCKSTAR? Just click on one of the buttons below to start your rocking journey!