I would like to display a warning message based on a comparison of 2 answer values (not an error that stop people proceeding).
Hope someone can help, more details follow,
thanks
Dan
I have a Grid question (with some javascript to make it appear like a thermometer with a slider for people to record their health score out of 100) = (“hs_r1_c1”)
Later they enter another health score (“newhs_r1_c1”).
I would like a message to appear if their new health score is less than, or equal to, their original score - to check they meant this to happen.
These should not be errors that stop people proceeding - just flagging it to avoid inadvertent bad answers.
This would need to go on the page which features the second Grid question ("newhs_r1_c1").
Something like:
if (SSI_GetValue ("hs_r1_c1") == SSI_GetValue ("newhs_r1_c1") )
{
strErrorMessage = “we noticed your new health score is the same as you scored it today – is that right? If not, please adjust your new score”;
}
if (SSI_GetValue ("hs_r1_c1") > SSI_GetValue ("newhs_r1_c1") )
{
strErrorMessage =“we noticed your new health score is lower (worse) than you scored it today – is that right? If not, please adjust your new score”;
}