The reason is that
handleRadioChange()
is being triggered, which updates the select element and removes the selected value.It must be analysed why
handleRadioChange()
is triggered and, as a result, clearing the already selected value.handleRadioChange()
is being triggered, which updates the select element and removes the selected value.handleRadioChange()
is triggered and, as a result, clearing the already selected value.Code: Select all
// Called whenever a radio button's selection changes
function handleRadioChange(radio, e) { // <--- added e parameter
// console.log("Selected radio button ID:", radio.id);
// Set a Hash Cookie, that is used in the select SQL, not quite sure what value should be set though
nuSetProperty('kateg', radio.id);
nuSetValue('kateg', nuGetProperty('kateg'));
if (e && e.isTrusted) { // <--- added: Only refresh the dropdown when change is triggered by the user
nuRefreshSelectObject('podkateg_rasx');
}
}
Code: Select all
handleRadioChange(this);
Code: Select all
handleRadioChange(this, event);