I have a slider with the following code for the slider msg.
This shows the min, value and max and works fine.
I would now like to conditionally show the {value} if a flag is true.
I tried using If then statements but that fails as the if (condition){true}{false} brackets are interpreted as field values and throw and error.
I then tried creating a js function that would return the html depending on the condition.
I followed the instructions in the slider comments on the top and made a function call sliderMsg and put this in the slider msg box as
js:sliderMsg
I then created my function with the same name. When I run the slider it says sliderMsg is and unknown function.
I also tried sliderMsg() which also was not found.
So.... Where should this function be created and how should it be referenced.....or how do I get a conditional statement in the HTML?
Thanks,
tom
Code:
<div style="width:100%; text-align:left; position:relative; padding-left:10px; padding-right:10px;"> <span style="text-align:left;display:inline-block; width:30%; border:1px green solid;">{min}</span> <span style="text-align: center;display:inline-block; width:30%; border:1px green solid;">{value}</span> <span style="text-align:right;display:inline-block; width:30%; border:1px green solid;">{max}</span> </div>
I would now like to conditionally show the {value} if a flag is true.
I tried using If then statements but that fails as the if (condition){true}{false} brackets are interpreted as field values and throw and error.
I then tried creating a js function that would return the html depending on the condition.
I followed the instructions in the slider comments on the top and made a function call sliderMsg and put this in the slider msg box as
js:sliderMsg
I then created my function with the same name. When I run the slider it says sliderMsg is and unknown function.
I also tried sliderMsg() which also was not found.
So.... Where should this function be created and how should it be referenced.....or how do I get a conditional statement in the HTML?
Thanks,
tom
Comment