on 04-03-2016 5:01 PM
Hi Experts,
I placed 2 radio buttons in SSCE. I defined an onSelect event function for each radio button.
when I select first radio button, first radio button event and second radio button event both are called instead of first event.It is same when I select second radio button.
functions:
function bydate(oEvent)
{
alert("bydate");
}
function bysfc(oEvent)
{
alert("bysfc");
}
Is it a bug? or Am I missing anything ?
Also, How can I make one radio button default selected. I gave property Selected = "true" for a radio button. It didn't work.
MII version 15.0 SP5 Patch4
Any help is appreciated.
Hi Naga,
When you have events on both the radio buttons when you select the other radio button 1st currently selected radio buttons deselect will happen, so event gets fired because of that. Hence you observe both events are being called on click of 1 Radio button.
You can over come this in the following way.
function firstEvent(oEvent){
if(oEvent.getParameter('selected') ) //if the radio button is selected
alert("Event 1");
}
function secondEvent(oEvent){
if(oEvent.getParameter('selected') ) //if the radio button is selected
alert("Event 2");
}
For Default Selection you can use the following method.
RadioButton0_c0c0.setSelected(true);
add that in the 1st line of your custom code.
Regards,
Sriram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.