# Populating a drop down list based upon another field



## preisinger (Jun 25, 2008)

I have 2 fields. Once the user enters data into the 2nd form I would like to do a SQL database lookup and populate a drop down list box. I have inherited some code from a former co-worker and need to customize it to add this functionality. Currently it appears that he is using ASP.net, JavaScript and C#. Anything compatitable should work.

I have got it working except for the fact that I cannot get the variables to get inputed as my parameter values instead of the dummy values I put "1234" and "5678" I suspect that I may be missing something really simple but I can't seem to figure it out.

Listed is a section of my current code (with a few connection lines removed) :
-------------------

" onBlur="PopulateVisitID(this.form.sltVisitTimes<%=i%>,this.form.txtPatientID<%=i%>,this.form.txtPaperworkDate<%=i%>)" onkeypress="return noenter(event);" VALUE="<%=Request["txtEmployee"]%>">
new CAPXOUS.AutoComplete("txtEmployee<%=i%>", function() {
return "employee_dropdown.aspx?typing=" + this.text.value;
});


----------

