|
Add dropdown list box with values for search. E.g. when you
select a company name from dropdown list box, only the data
concerning selected company are displayed.
To add this event use
(Insert ASP code
snippet) button on the Visual Editor page.
Note: Change the values listed in
red to match your specific needs.
'create dropdown box
str = ""
str = str & "<select onchange=""window.location.href=this.options[this.selectedIndex].value;""><option value="""">Please select</option>"
'select values from database
strSQL = "select company from tablename"
Set rstmp = server.CreateObject("ADODB.Recordset")
rstmp.open strSQL,dbConnection
while not rstmp.eof
str = str & "<option value=""tablename_list.asp?a=search&value=1&SearchFor=" & rstmp("company") & "&SearchOption=Contains&SearchField=company"">" & rstmp("company") & "</option>"
rstmp.movenext
wend
str = str & "</select>"
Response.Write str
|
|