AnsweredAssumed Answered

Refresh DD with JS

Question asked by marp on Nov 27, 2015

Unfortunately, I am not a java/vb developer. Maybe someone could be so kind and help me...again? I have two DD and I set the value from the second DD to NULL (“Please select a value…”) if the value of the first DD is not NULL (“Please select a value…”). Works like a charm with the Code down below.

 

But when I save the Form, the data from the previous selection still exist in the DD "dd_monitorstandalone" (value "Please select a value" will be shown in the DD) and a wrong value will written to the list behind (DD "dd_monitorstandalone" ...Text connected to Colum "Monitor" in list "HardwareRequest") . How can I refresh the DD "dd_monitorstandalone" ...to ensure that no wrong value will be written to the list behind. I appreciate every suggestion!

 

Tia!

 

function setMonitorType(myControl) {
    var nullValue = '';
    if (myControl.val() != nullValue) {
        NWF$("#" + dd_monitorstandalone).val(nullValue);

    }
}
NWF.FormFiller.Events.RegisterAfterReady(function () {
    NWF$("#" + dd_typehw).on("change", function (event) {
        setMonitorType(NWF$(this));
    });
});

Outcomes