cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a script event for radio buttons in Personas 3.0?

former_member238607
Participant
0 Kudos

The heading pretty much says it all. I'd like to have a script event fire when a radio button group value changes, but I can find no way to do that in Personas 3.0. In searching for a solution, I've found posts for version 2 that reference a OnValueChanged event, but I cannot find that in 3.0.

Thanks for your help!

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Jeff,

Currently, there is no such event for radio button controls in SAP Screen Personas 3.0. One possible option is to place a 'Clickable Area' with 'No Color' as the fill color over each radio button and assign scripts for the OnClick event of the clickable areas. In the OnClick event script, ensure that you first set the corresponding radio button using the 'select' function like below:

session.findById(<id of the radio button>).select();

After this statement, you can do any other action that you require.

Best regards

Kranthi

SAP Screen Personas Team

former_member238607
Participant
0 Kudos

Hi Kranthi,


Thanks for your replay and suggestion. Is there a way to determine the id of the clickable area that was clicked? Say I have a group of four radio buttons, I'd like to use the same script for all the buttons, but I'd need to know which area was clicked so my code could take the appropriate action.


Are there any plans to add an onClick event for radio buttons? That would be a very useful event to have. Even better would be a group box, with an onChange event, just for radio buttons. That would allow us to get the selected value from the group box rather than the individual radio buttons within it.


Thanks again for all your help!

floriansauerland
Explorer
0 Kudos

Hello,

you can use this to get the id of any element. It is in the Scripting Editor.

Regards

Florian

former_member238607
Participant
0 Kudos

Hi Florian,

Yes, I'm using the object inspector to get the ids, I was looking for a way to dynamically capture them in script when a clickable area is clicked. Another user gave me the answer to that, by using source.id in my JavaScript.

Thanks!

Answers (0)