Highlighted

White Pages on Published File

New Here ,
May 13, 2020

Copy link to clipboard

Copied

Alright my new problem seems even weirder than the last.

 

I have three pages in my document that when exported appear completely blank / white in the browser.

On each of these pages there are or more buttons and they seem to still be there (just invisible) as I can click them and they execute their actions just fine.

 

This is only the case when entering the slide in a regular way, like clicking a button to "Go to next slide" on the previous page.

If I jump to the specific time in the Captivate timeline the pages load just fine.

 

When expecting the pages I have gotten this warning message pointing at the CPXHRLoader.js:

unreachable code after return statement

The other two error messages I have gotten once, but haven't been able to replicate it since can be seen here:

Bildschirmfoto 2020-05-13 um 14.15.33.png

Bildschirmfoto 2020-05-13 um 13.02.22.png

Some of my observations:

 - All of these pages include some Javascript on entering the slide.

 - My other pages including Javascript on entering the slide, don't cause this issue

 - There is not a single line of code that these three pages share in their on load Javascript

 - Two of these three pages have not been touched at all since my last working version

 - The first page, has changed slightly in the code

 

Lets break down these pages:

1st problematic page:

The code of this page sets the values of some variables, it's just a bunch of lines looking like this:

window.cpAPIInterface.setVariableValue("var_t2_A_check",1);

The only thing that changed in the code is some 1 turned to 0 and vice versa.

These variables are used to let the program know which answers in the following section are correct or incorrect.

 

Pages in between:

These are custom quiz pages, basic functions:

It checks if the quiz has been completed.

If it hasn't, it checks if there have been answers that were already selected (going back and forth while reviewing answers) and allows the selection/reselection of answers (simple toggle on and of with seperate variables for each answer to save the selection for later review).

If the quiz has been completed, it shows an explanation of the solution, a correct / incorrect message, shows which answers had been selected and highlights all true answers / fades all incorrect ones.

For this it compares the selection variables from each answer with the variables from the previous page stating "true" or "false".

 

2nd problematic page:

This page has two buttons, one that simply goes back to the previous slide, and a second one to submit answers. This locks all answer buttons in the previous pages and calculates the score by comparing the selection variables from each answer with the variables from the first page stating "true" or "false". Then continues over to the next page.

 

3rd problematic page:

This is my custom results page. It shows the score calculated when hitting the submit button on the previous page.

On loading this page, it checks if the score is high enough to have passed or failed the test and shows a corresponding message.

 

 

So it seems that there is an issue with the slightly changed variables on the first page as the other pages are displaying information based on an interaction with these.

All of this code worked perfectly before and I can see that the code still works, when clicking the invisible buttons. The score is correctly added up, and when reviewing my answers, the correct answers are highlighted, etc.

When validating my code, there are no errors such as a missing bracket or semicolon showing up anywhere either.

 

 

Views

21

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

White Pages on Published File

New Here ,
May 13, 2020

Copy link to clipboard

Copied

Alright my new problem seems even weirder than the last.

 

I have three pages in my document that when exported appear completely blank / white in the browser.

On each of these pages there are or more buttons and they seem to still be there (just invisible) as I can click them and they execute their actions just fine.

 

This is only the case when entering the slide in a regular way, like clicking a button to "Go to next slide" on the previous page.

If I jump to the specific time in the Captivate timeline the pages load just fine.

 

When expecting the pages I have gotten this warning message pointing at the CPXHRLoader.js:

unreachable code after return statement

The other two error messages I have gotten once, but haven't been able to replicate it since can be seen here:

Bildschirmfoto 2020-05-13 um 14.15.33.png

Bildschirmfoto 2020-05-13 um 13.02.22.png

Some of my observations:

 - All of these pages include some Javascript on entering the slide.

 - My other pages including Javascript on entering the slide, don't cause this issue

 - There is not a single line of code that these three pages share in their on load Javascript

 - Two of these three pages have not been touched at all since my last working version

 - The first page, has changed slightly in the code

 

Lets break down these pages:

1st problematic page:

The code of this page sets the values of some variables, it's just a bunch of lines looking like this:

window.cpAPIInterface.setVariableValue("var_t2_A_check",1);

The only thing that changed in the code is some 1 turned to 0 and vice versa.

These variables are used to let the program know which answers in the following section are correct or incorrect.

 

Pages in between:

These are custom quiz pages, basic functions:

It checks if the quiz has been completed.

If it hasn't, it checks if there have been answers that were already selected (going back and forth while reviewing answers) and allows the selection/reselection of answers (simple toggle on and of with seperate variables for each answer to save the selection for later review).

If the quiz has been completed, it shows an explanation of the solution, a correct / incorrect message, shows which answers had been selected and highlights all true answers / fades all incorrect ones.

For this it compares the selection variables from each answer with the variables from the previous page stating "true" or "false".

 

2nd problematic page:

This page has two buttons, one that simply goes back to the previous slide, and a second one to submit answers. This locks all answer buttons in the previous pages and calculates the score by comparing the selection variables from each answer with the variables from the first page stating "true" or "false". Then continues over to the next page.

 

3rd problematic page:

This is my custom results page. It shows the score calculated when hitting the submit button on the previous page.

On loading this page, it checks if the score is high enough to have passed or failed the test and shows a corresponding message.

 

 

So it seems that there is an issue with the slightly changed variables on the first page as the other pages are displaying information based on an interaction with these.

All of this code worked perfectly before and I can see that the code still works, when clicking the invisible buttons. The score is correctly added up, and when reviewing my answers, the correct answers are highlighted, etc.

When validating my code, there are no errors such as a missing bracket or semicolon showing up anywhere either.

 

 

Views

22

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 13, 2020 0
hdwP LATEST
New Here ,
May 15, 2020

Copy link to clipboard

Copied

I have managed to get a little further with this:

When I move my on-load script to a button, everything displays fine. The weird thing is, that this code worked fine as on-load script before. For the first two pages where I have this problem this isn't really much of a problem, as I can easily move the code to the button that lets the user enter this slide.

As for the results page this would be possible if I combine this slide with the previous slide. That would mean I'd just have a bunch of objects in need of hiding/showing when clicking buttons. In other words a lot more complicated than it needs to be.

 

To clarify: for some reason any bit of code in the on-load javascript seems to cause this problem on these slides (but none of my other pages that have on-load javascript). Therefore it really can't be an issue with the content of the code.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 15, 2020 0