Good Day to all!
I am working on a function that is making my head hurt. I know it's something simple so hopefully one of you great people will point me in the right direction:
I created this function:
that is to be used on an onchange event of the drop down list, like so:Code:function getCompanyFaxAndPhone(document.getElementById('ddlCompanyName').value) { Case "None": //None Selected document.PayoffEForm.txtPhoneNumber.value = ''; document.PayoffEForm.txtFaxNumber.value = ''; break; Case "Alaska Escrow & Title Insurance": document.PayoffEForm.txtPhoneNumber.value = "somePhone"; document.PayoffEForm.txtFaxNumber.value = "someFax"; break; }
<select id="ddlCompanyName" name="ddlCompanyName" onchange="getCompanyFaxAndPhone()">
<option value="None">None</option>
<option value="something1">something1</option>
<option value="something2">something2</option>
<option value="something3">something3</option>
</select>
It "looks" right but when I run it, I get the "Object Expected" error on the onchange event....
help!
thanks a bunch




Reply With Quote