Check documentation for the latest version of dhtmlxSuite onRadioClick DHTMLX Docs


fires when the user clicks any radio item

void onRadioClick(string group,string|number idChecked,string|number idClicked,string zoneId,object cas);
groupstringname of the radio group
idCheckedstring|numberid of the checked radio item
idClickedstring|numberid of the clicked radio item
zoneIdstringid of the context menu zone, if a menu rendered in the context menu mode
casobjectstate of CTRL/ALT/SHIFT keys during the click (pressed/not pressed)


myMenu.attachEvent("onRadioClick", function(group, idChecked, idClicked, zoneId, cas){
    // your code here
    // ...
    // cas example
    if (cas.ctrl == true) {
        // open in a new tab
    } else {
        // open on the same page
    // allow radio button to be checked
    return true;


The cas object has the following structure (true if a key was pressed during the click):

    ctrl:   true|false,
    alt:    true|false,
    shift:  true|false

The event is cancellable, to allow checkbox to be checked you need to "return true".

Back to top