HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... Error with if action in Firefox
Error with if action in Firefox
  View type:
I use the if action to determine how often a user has clicked a button. It's used in the following way:

1) On the slide (beforedisplay event) I create a new slide variable "clicks" and set the value 0.
2) On a button I check the value of clicks and set it to 1 after the first click like the following:
IF(Condition="#clicks == 0")
[some action here]
If(Condition="#clicks == 1")
[some other action here]
VARIABLE(Name='Clicks', Value='1', Scope='Current Slide'

This works fine in IE, but doesn't work in Firefox (the variable is set, but the IF clause does not seem to work)

Can anyone approve this error?
 
I rewrote the if block in a javascript action like this:

if(g_arSlideVars["clicks"] == 0){
[some action]
if(g_arSlideVars["clicks"] == 1){
[some other action]
}

and guess: it works. Would be nicer to use the built-in functions, but for now I can live with it.

Peter
Subject:
Message options
No additional options