I have a select box that I am trying to clear and then repopulate. It is dynamic built on a recordset. I have tested the records and got alert boxes to popup with the correct data. I have searched the internet now for hours and cannot find anything that tells me how to repopulate the select box. It is a dependent box. The code is below...
function ezn(){
<%sTr="Select * From [District Abatements]"
set da=ezConn.Execute(sTr)
while da.eof=False%>
if (document.add_ez.ez.value=='<%=da("EZ ID")%>'){
//this is the line that i am having trouble with....
document.add_ez.ed.options[1]=new option ('<%=da("District Code")%>','<%=da("District Code")%>')
}
<%da.movenext
wend%>
}
Thanks for the help,
Jack
function ezn(){
<%sTr="Select * From [District Abatements]"
set da=ezConn.Execute(sTr)
while da.eof=False%>
if (document.add_ez.ez.value=='<%=da("EZ ID")%>'){
//this is the line that i am having trouble with....
document.add_ez.ed.options[1]=new option ('<%=da("District Code")%>','<%=da("District Code")%>')
}
<%da.movenext
wend%>
}
Thanks for the help,
Jack