Hello,
I have a JavaScript that checks if the field is not empty it dissables the field. I was trying to modify my code to enable the field depending on the response given in another field.
Here is what I have so far
original code
this is what I added
adding the code above makes my fields editable no matter what
not sure what I am doing wrong.
any help is much appreciated
Thanks!!!
I have a JavaScript that checks if the field is not empty it dissables the field. I was trying to modify my code to enable the field depending on the response given in another field.
Here is what I have so far
original code
Code:
var var33= Runner.getControl(pageid,'resp');
var var34= Runner.getControl(pageid,'explain');
var var35= Runner.getControl(pageid,'iscontroldocumented');
var var36= Runner.getControl(pageid,'narrativeofcontrol');
var var37= Runner.getControl(pageid,'frequency');
var var38= Runner.getControl(pageid,'personresponsable');
var var39= Runner.getControl(pageid,'manualorautomated');
var var55= Runner.getControl(pageid,'correctiveactionplanned');
var var50 = Runner.getControl(pageid, 'plancompletiondate');
var var58 = Runner.getControl(pageid, 'Status');
if (var50.getValue() != ''){
var50.setDisabled();
var55.setDisabled();
var33.setDisabled();
var34.setDisabled();
var35.setDisabled();
var36.setDisabled();
var37.setDisabled();
var38.setDisabled();
var39.setDisabled();
}
this is what I added
Code:
else if (var58.getvalue()=='No'){
var50.setEnabled();
var55.setEnabled();
var33.setEnabled();
var34.setEnabled();
var35.setEnabled();
var36.setEnabled();
var37.setEnabled();
var38.setEnabled();
var39.setEnabled();
}
not sure what I am doing wrong.
any help is much appreciated
Thanks!!!