Hi,
I have an asp generated form with database populated drop down(Select) boxes.
The recordset data is also added to a 2d array. This works fine, however I then want to update a couple of text boxes dependant on the selection made from the dropdown. I want this done client side (hence the use of the array)
My dropdown contains an onClick event to call a Javascript
this then is supposed to read the array and update the appropriate boxes with the correct data.
If I 'hardcode' a value in to the javascript works ok, likewise If I place the arraykey field it updates etc but I cant seem to retrieve the actual array data.
Can anybody suggest where I may be going wrong. or suggest an alternative method..
Select call =
onChange='UpdateAuth(document.NewSRD.cboAuthOfficer.value)'
javascript is : -
<SCRIPT language="javascript">
function UpdateAuth(AuthId)
{
if (document.NewSRD.cboAuthOfficer.value > 0)
{document.NewSRD.txtAuthDept.value = AuthArray(3,Authid)
NewSRD.txtAuthDept.focus()
return false;}
return true;
}
</SCRIPT>
I have an asp generated form with database populated drop down(Select) boxes.
The recordset data is also added to a 2d array. This works fine, however I then want to update a couple of text boxes dependant on the selection made from the dropdown. I want this done client side (hence the use of the array)
My dropdown contains an onClick event to call a Javascript
this then is supposed to read the array and update the appropriate boxes with the correct data.
If I 'hardcode' a value in to the javascript works ok, likewise If I place the arraykey field it updates etc but I cant seem to retrieve the actual array data.
Can anybody suggest where I may be going wrong. or suggest an alternative method..
Select call =
onChange='UpdateAuth(document.NewSRD.cboAuthOfficer.value)'
javascript is : -
<SCRIPT language="javascript">
function UpdateAuth(AuthId)
{
if (document.NewSRD.cboAuthOfficer.value > 0)
{document.NewSRD.txtAuthDept.value = AuthArray(3,Authid)
NewSRD.txtAuthDept.focus()
return false;}
return true;
}
</SCRIPT>