June 17, 2018 at 3:31 AM #399737
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
MathJune 17, 2018 at 4:00 AM #399739
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!June 17, 2018 at 11:16 AM #399743
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…
June 17, 2018 at 11:39 AM #399746
- This reply was modified 2 years, 4 months ago by Math Notermans.
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…June 17, 2018 at 11:50 AM #399748
Thx Joe figured it out… this worked…
var tocElement = $(‘.tocClass’,getDisplayDocument());June 17, 2018 at 12:21 PM #399750
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.June 17, 2018 at 12:30 PM #399752
@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.June 17, 2018 at 12:36 PM #399754
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.
- This reply was modified 2 years, 4 months ago by Joe Wieloch.
You must be logged in to reply to this topic.