Get the radio button DOM objects of XPages Radio Group by Dojo

var chkRadioObj = dojo.query("input[name$='#{id:YOUR_RADIO_GROUP_ID}']");
for(var i=0; i < chkRadioObj.length; i++){
    if(chkRadioObj[i].checked){
        alert(chkRadioObj[i].value);
    }
}





This snippet gets the all radio button DOM objects and returns the checked radio button value by dojo (client Javascript). Please replace YOUR_RADIO_GROUP_ID to your RadioGroup id in xpages.

JavaScript (Client)
Kazunori Tatsuki
October 31, 2013 1:16 AM
Rating
287

All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.



1 comment(s)Login first to comment...
Leon Matthys
(at 02:19 on 20.09.2018)
Useful. Thanks