Table of Contents not showing page complete
December 23, 2016 12:00 AM
I have an interesting issue where I have 3 pages that will not show completed in the Table of Contents regardless of whether I go through them or if I use the Table of Contents to visit the page. Initially, I have the TOC hidden until the learner has completed a specific page, but it does correctly show all other pages visited once the TOC is available.
I know one workaround would be to have an action on page show to set the TOC status to completed, but I also don't know why this isn't working on its own.
One thing about each of the pages is that they all have some kind of clickable item:
The first page that won't show up has a button with no actions on it (it's the example of the show/hide toc that's used once the TOC is available). This occurs even if I replace the the non-action button with a text box.
The second page has a clickable hyperlink and a clickable image within a text box.
The third page has a clickable image that has show and hide functions. It also has a second clickable image that is conditionally shown and when clicked, goes to the next page.
I can't seem to puzzle this one out, as all three are included in the TOC and I can't find anything that would cause the page to not get labeled complete once visited. If you want a sample, I can try and put one together.
Discussion (6)
While the attachment isn't the module I referenced above, this one is not showing any page completed even when I go through the whole course or manually click on one of the items in the TOC...I'm completely stumped.
I looked at your attached sample. There are multiple "Execute JavaScript" actions that throw JavaScript errors. I removed all such actions from the title and bookmarking started working again. Attached are a couple of screenshots of where the actions are.
Several of your respective actions contain a specific id and I fear none of it is correct. The script will still look for the named object and produce an error as it cannot find it.
If you check the image with the compass on page 3 "Course navigation", you'll see that the action refers to "image39786". First thing is, this is not the html name / id of this image. Second is, in that other thread we found that it's not the image but the undefined
around the image that needs to be adressed.
So the correct javascript for this image would be:
document.getElementById(“image48826anc”).tabIndex = “-1”;
You can replace "image48826" with "%HTMLNAME%" to make Lectora insert the correct value automatically.
You should make sure that all objects that you want to remove from the taborder have an action with exactly the same code in it (the code you've posted):
document.getElementById(“%HTMLNAME%anc”).tabIndex = “-1”;
During publication Lectora will replace "%HTMLNAME%" with the html name / id of the object the action is attached to.
I done a short test in your file. Once the code is corrected, there are no more errors.
Hmm...Something must have happened when I changed the theme graphics - the bar right/left and header/footer were added later but this worked during initial testing. And, it isn't "broken" on every page in my full course. It's important to me to hide certain objects from the tab order, so I'm using the script discussed in another thread and seems to be fine on some pages, but not others:
document.getElementById("%HTMLNAME%anc").tabIndex = "-1";
The thread I'm referring to where I got the code from is here:
http://community.trivantis.com/forums/topic/hide-from-focus/
I did go through and found all of the items that had a specific target and changed it to the generic code and all is well on my latest run through. Thanks again and I hope you had a good holiday weekend!
I went back and removed the JS from the "newer" pages and it did work in run mode, so I'm not sure what happened initially. I'm going to retest after publishing to HTML and see what happens. Thanks for the pickup!
Discussions have been disabled for this post