JS - setting value of a Combobox & radio btn fields dynamically

Hi all,

I have some JS code in the “onChange” event of a field (“InstallationEmployee”) that is not working. When trying the code I can see the targeted field (“DeliveryEmpList”) appear and then disappear and not getting set.

I have set value in text fields before but this is a first for me (setting the value of a combobox field from another combobox field). Can someone tell me what I am missing here. I have posted some code here a few days ago but after trying the suggested code I was still getting the same non-working results.

Here is the code :

var f = document.forms[0];

var InstallEmp = f.elements[“InstallationEmployee”];

var empList = f.elements(“DeliveryEmpList”);

var DelBy = f.elements(“DeliveredBy”);

var tmpValue = “-Select an Employee-”;

if (InstallEmp.options[InstallEmp.selectedIndex].text != “-Select an Employee-”) {// get the value in “InstallationEmployee” combobox field

DelBy.value == “Staff Member”;// set the value in “DeliveredBy” Radio btn field

DelBy.selected = true;

empList.style.visibility = ‘visible’; // display the “DeliveryEmpList” combobox field

empList = InstallEmp.value; // set the value of “DeliveryEmpList” combobox field to be same as the “InstallationEmployee” field

empList.focus();

empList.selected = true;

} else {

empList.style.visibility = ‘hidden’;

empList.selected = false;

}

_doClick(‘$Refresh’,this,null);

Much appreciated,

Dan