on 08-07-2008 5:18 AM
Hi,
In my interactive form i have radiobuttonlist. I want to uncheck when the input fields are empty. How can i do that. Please let me know if anybody know about this and explain me how to do this.
Thanks,
Senthil Prabhu
Senthil,
Yes this is possible. Following line of code should uncheck the radio-button value if you have checked it.
<Your-RadioButtonList-Name>.<Your-RadioButton-Name>.rawValue = null;
Example:-
Lets say you have two inputfields say TextField1 and TextField2, 4 radio buttons say rb1,rb2,rb3,rb4 all grouped within a RadioButtonList called rbList and a Button in your form. As per your requirements lets say when the button is clicked, you want the radio buttons to be unchecked if TextField1 or TextField2 is empty..
Change language to JavaScript and for click event of Button code will look as follows:-
----- form1.#subformSet[0].frm1.Button1::click: - (JavaScript, client) -----------------------------
if(TextField1.rawValue == null || TextField2.rawValue == null)
{
rbList.rb1.rawValue = null;
rbList.rb2.rawValue = null;
rbList.rb3.rawValue = null;
rbList.rb4.rawValue = null;
}
Chintan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.