Skip to main content
Participating Frequently
June 30, 2015
Answered

advanced action not working html5

  • June 30, 2015
  • 2 replies
  • 712 views

Hi there,

I'm using Adobe Captivate 8.0.2.266.

I'm having an issue with an advanced action which works fine when published as SWF but not as HTML5


I have a Checkbox widget with the Checkbox Text 'I have read and understood the statement above' and a Variable name of agreement

I also have a text button with an advanced action which is:

IF agreement is equal to 'I have read and understood the statement above'

Assign cpLock with 0

Assign cpCmdShowPlaybar with 1

Go to next slide

As I said it works fine when published as an SWF but not in HTML5 any ideas why this could be? I'm using a local uniserver to view the HTML5 content not running it from its location in windows explorer (if I do this the checkbox doesn't even appear).

Any advice would be greatly appreciated.

Thanks

This topic has been closed for replies.
Correct answer TLCMediaDesign

OK, I've built a test based on what you described. It does not work in HTML5.

I created and else statement that alerts (agreement == "I have read and understood the statement above") and it alerts true.

I also put a text caption that displays agreement, and it shows the text correctly when selecting the checkbox.

The problem is that Captivate is putting an extra set of quotes around the text in the CPM.js:

'if ((cp.ho(\'agreement\') == cp.ho(\'"I have read and understood the statement above"\')))\

if you change it to it will work:

'if ((cp.ho(\'agreement\') == cp.ho(\'I have read and understood the statement above\')))\

2 replies

TLCMediaDesign
TLCMediaDesignCorrect answer
Inspiring
June 30, 2015

OK, I've built a test based on what you described. It does not work in HTML5.

I created and else statement that alerts (agreement == "I have read and understood the statement above") and it alerts true.

I also put a text caption that displays agreement, and it shows the text correctly when selecting the checkbox.

The problem is that Captivate is putting an extra set of quotes around the text in the CPM.js:

'if ((cp.ho(\'agreement\') == cp.ho(\'"I have read and understood the statement above"\')))\

if you change it to it will work:

'if ((cp.ho(\'agreement\') == cp.ho(\'I have read and understood the statement above\')))\

lambuginiAuthor
Participating Frequently
June 30, 2015

Thank you very much that has that worked!

Just one further query. Is there any way to ensure this is what is output from captivate or would I manually have to alter this file each time I publish? If not, would it be the case that any advanced actions where you are trying to check a literal string would fail in HTML5, because captivate adds the extra quotes?

TLCMediaDesign
Inspiring
June 30, 2015

You'd need to change it every time you publish.

I've never experienced it before because I use JavaScript for the e4valuations in purely HTML5 courses.

It might be possible to do another evaluation for "I have read and understood the statement above" also.

TLCMediaDesign
Inspiring
June 30, 2015

Ensure that there is not a space at the end of the text: 'I have read and understood the statement above '.