Lectora 17 Pages merged instead of displayed separately

mlapl1
mlapl1 Community Member Posts: 349
Hello

I have 2 separate Lectora 17 pages. Let's call them Page 1 and Page 2. They are relatively simple pages though one contains a bit of JS.

I am on Page 1. I click on the "Next" button (defined either as goto the next page or goto Page 2) but instead of moving on to the next page, Page 2 is superimposed over page1. In other words, both pages are MERGED.  I have tried rewriting Page 2 (which I think is the culprit) but to no avail.

I am using Lectora 17 trial version patched to 17.0.3.

Has anyone experienced this before? I have even copied the pages to a new Lectora title to experiment better - but it is taking a lot of my time and I have not been successful.

All insights welcomed. Thank you.

Andrew

Comments

  • klaatu
    klaatu Community Member Posts: 988
    Its probably the bane of Inspire - Seamless play. Try without it.
  • mlapl1
    mlapl1 Community Member Posts: 349
    Thanks Darrel - I will do so on my experimental course. However,  I am pretty sure that I had switched off the seamless feature in my real title - and the problem persisted.

    However, I have now tracked the problem down to a piece of JS (see below). The code is invoked with an onshow page statement. You may remember that you (I think it was you Darrel) invented it to allow me to randomly access audio and video files - anyway several people cooperated - thank you.

    I have tried to move the code to other parts of the title but it does not seem to work. The interesting thing is that if I preview the page in a browser it works perfectly well. It fails only when I publish the title and navigate from page to page.

    myplayer3 = document.getElementById("audio557Media");
    "Media"myplayer3.addEventListener("timeupdate", function(e) {
    var currentTime = myplayer3.currentTime;
    if(currentTime >=VarAudio_Stop.getValue()){
    myplayer3.stop();
    }
    }, false);
  • mlapl1
    mlapl1 Community Member Posts: 349
    It looks like it WAS the seamless option (which appears to turn itself back on every time you recompile the lesson - I thought once you turned it off it stayed off - I had turned it off before but did not check...).

    Thank you Darrel!!
  • mlapl1
    mlapl1 Community Member Posts: 349
    Maybe "seamless" did not reset itself automatically but somehow I switched it back on again as I was running from one title to another. I will need to develop the habit of checking on it before compiling.

    Thanks again - it was driving me nuts!
  • approg
    approg Community Member Posts: 258 ♪ Opening Act ♪
    The issue is this line
    myplayer3 = document.getElementById(“audio557Media”);

    In seamless, the element audio557Media probably can't be so easily found so myplayer3 will be undefined: resulting in the following JS code throwing errors.

    Instead of just calling document do something like

    var doc = getDisplayDocument();
    myplayer3 = doc.getElementById(“audio557Media”);
  • mlapl1
    mlapl1 Community Member Posts: 349
    Thank you so much @approg. I will try what you suggest.