cancel
Showing results for 
Search instead for 
Did you mean: 

radio button issue in SSCE

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (0)