I need to write a script that if two check boxes or radio buttons are selected, then an action will be performed.
if (condition1 && condition2);
{action}
so I have this as my code for my button:
form1.page66.RadioButtonList.#field[0]::change - (JavaScript, client)
if(this.rawValue == 1 && form1.Intro.RadioButtonList[0].CN.rawValue == 2);
{Intro.presence = "hidden"};
however, the action does not perform.
Solved! Go to Solution.
Views
Replies
Total Likes
I see a syntax error in your code.
Here is the corrected one.
if(this.rawValue == 1 && form1.Intro.RadioButtonList[0].CN.rawValue == 2)
{
Intro.presence = "hidden";
}
Thanks
Srini
Note: rawValue was also missed in the syntax. You need to have that property to get the selected value in JavaScript.
Message was edited by: Srini Dhulipalla
Views
Replies
Total Likes
The problem is you can not get access to rawValue property in the Change event.
So move the code to Click event instead to make it to work.
Thanks
Srini
Thank you,
I updated my code but I think I am still doing something wrong. Its performing the action with only one condition being true.
Button 1
Button 2
Button 3
Button1a
Button2a
Button3a
If button 1 and button2a are selected, then hide page Intro.
Updated code:
form1.page66.RadioButtonList.#field[0]::click - (JavaScript, client)
if(this == 1 && form1.Intro.RadioButtonList[0].CN == 2);
{Intro.presence = "hidden"};
it is hiding page Intro without both conditions being met.
Views
Replies
Total Likes
I see a syntax error in your code.
Here is the corrected one.
if(this.rawValue == 1 && form1.Intro.RadioButtonList[0].CN.rawValue == 2)
{
Intro.presence = "hidden";
}
Thanks
Srini
Note: rawValue was also missed in the syntax. You need to have that property to get the selected value in JavaScript.
Message was edited by: Srini Dhulipalla
Views
Replies
Total Likes