hi,
I have a function that can be called fine from the onLoad() event, but if i try to call it from an onChange() event, it doesnt work, giving a "object doesnt support this property or method) error. for example,
function StatusReason()
{
alert("function called"
if (document.CertificateForm.Status.options[document.CertificateForm.Status.selectedIndex].text == "Cancelled"
{
fillReasonStatusCancelledSelect();
}
if (document.CertificateForm.Status.options[document.CertificateForm.Status.selectedIndex].text == "Change Of Address"
{
fillReasonStatusChangeOfAddressSelect();
}
if (document.CertificateForm.Status.options[document.CertificateForm.Status.selectedIndex].text == "Duplicate/Replacement"
{
fillReasonStatusDuplicateSelect();
}
if (document.CertificateForm.Status.options[document.CertificateForm.Status.selectedIndex].text == "Partially Revoked"
{
fillReasonStatusPartiallyRevokedSelect();
}
if (document.CertificateForm.Status.options[document.CertificateForm.Status.selectedIndex].text == "Revoked"
{
fillReasonStatusRevokedSelect();
}
if (document.CertificateForm.Status.options[document.CertificateForm.Status.selectedIndex].text == "Transferred Out"
{
fillReasonStatusTransferredOutSelect();
}
}
<body bgcolor = "#999999" text = "#000000" class = "banner" onLoad = " fillDropDowns();enable();setForCancel();StatusReason();">
<input type="select" onChange="StatusReason();"/>
I have the same code on other screens and it works fine. any ideas? i use ie6
Thank you
Kenneth Birney
User Interface Programmer
Scottish Police
I have a function that can be called fine from the onLoad() event, but if i try to call it from an onChange() event, it doesnt work, giving a "object doesnt support this property or method) error. for example,
function StatusReason()
{
alert("function called"
if (document.CertificateForm.Status.options[document.CertificateForm.Status.selectedIndex].text == "Cancelled"
{
fillReasonStatusCancelledSelect();
}
if (document.CertificateForm.Status.options[document.CertificateForm.Status.selectedIndex].text == "Change Of Address"
{
fillReasonStatusChangeOfAddressSelect();
}
if (document.CertificateForm.Status.options[document.CertificateForm.Status.selectedIndex].text == "Duplicate/Replacement"
{
fillReasonStatusDuplicateSelect();
}
if (document.CertificateForm.Status.options[document.CertificateForm.Status.selectedIndex].text == "Partially Revoked"
{
fillReasonStatusPartiallyRevokedSelect();
}
if (document.CertificateForm.Status.options[document.CertificateForm.Status.selectedIndex].text == "Revoked"
{
fillReasonStatusRevokedSelect();
}
if (document.CertificateForm.Status.options[document.CertificateForm.Status.selectedIndex].text == "Transferred Out"
{
fillReasonStatusTransferredOutSelect();
}
}
<body bgcolor = "#999999" text = "#000000" class = "banner" onLoad = " fillDropDowns();enable();setForCancel();StatusReason();">
<input type="select" onChange="StatusReason();"/>
I have the same code on other screens and it works fine. any ideas? i use ie6
Thank you
Kenneth Birney
User Interface Programmer
Scottish Police