1
I need to perform the selection of two checkbox, when I click on one the other is not selected, and when the other is selected this previous cannot be selected, and can select only one.
workerWOReprogram.sisteplant_CBReprogPeriod_OnChangeValue = function(oCheck, isChecked)
{
console.log("sisteplant_CBReprogPeriod_OnChangeValue");
if(isChecked)
scr.setValue("CBReprogWO", false);
else scr.setValue("CBReprogPeriod", true);
var RSWorkOrder = scr.getObject("RSWorkOrder");
var RSWorker = scr.getObject("RSWorker");
RSWorkOrder.setSelectionType(SELECTIONTYPE.All);
RSWorker.setSelectionType(SELECTIONTYPE.All);
}
workerWOReprogram.sisteplant_CBReprogWO_OnChangeValue = function(oCheck, isChecked)
{
console.log("sisteplant_CBReprogWO_OnChangeValue");
if(isChecked)
scr.setValue("CBReprogPeriod", false);
else scr.setValue("CBReprogWO", true);
var RSWorkOrder = scr.getObject("RSWorkOrder");
var RSWorker = scr.getObject("RSWorker");
RSWorkOrder.setSelectionType(SELECTIONTYPE.All);
RSWorker.setSelectionType(SELECTIONTYPE.All);
}
That’s my code, but I’ve been through it and I don’t know where I went wrong!
Once only one was selected, now I can select both, and that’s not what I want.
Can anyone help me? HTML BELOW
<fieldset name="LabelAndCheckBoxes_fieldset">
<checkbox labelText="_T(F_REPROG_PERIOD)" name="CBReprogPeriod" defaultValue="1" />
<checkbox labelText="_T(F_REPROG_WO)" name="CBReprogWO" defaultValue="0" />
</fieldset>
Wouldn’t it be better to
radio
instead ofcheckbox
?– Laércio Lopes
@Laérciolopes, the use of checkbox was requested
– Lucas Tadeu Egídio Arruda
@Leandrade, that didn’t work in my case
– Lucas Tadeu Egídio Arruda
Because it didn’t work, what problem you had?
– LeAndrade
I can’t pass on the example to my problem
– Lucas Tadeu Egídio Arruda
The right thing would be to post your Html and the code JS complete question.
– LeAndrade
@Leandrade postei
– Lucas Tadeu Egídio Arruda