This topic is locked

Dropdown in simple search on list page

8/7/2008 7:33:30 AM
ASPRunnerPro General questions
Z
zion4ever author

Hello good people,
Does anyone know how to create a lookup field (dropdown) with all items preloaded on the list page. It now has a text field. Something similar as the lookup wizard on the edit and view pages.
Tia
Hans

J
Jane 8/7/2008

Hi,
use custom event (Insert ASP code snippet option on the Visual Editor tab) to create dropdown with values from database.

Z
zion4ever author 8/7/2008

Thnx Jane.
Still one question:

I've tried to put it everywehere (before edit, onload)

The only place that seems to work is onload of the list page in the events tab. But it gives me my page and on the bottom it says:
Error number 3704

Fout beschrijving Operation is not allowed when the object is closed.

URL /Uitleenreg/tbluitleen_list.asp

SQL query select `ID`, `Object`, `Specificatie`, `Status`, `Datum uitgeleend`, `Datum terug`, `Uitgeleend aan`, `Restore`, `Opmerkingen` From `tbluitleen` where upper(`tbluitleen`.`Specificatie`) like upper('%laptop%')

Solution
Am I missing something. How can I put this dropdown instead of the textfield of the simple search form on the list page.
The asp code i've used:
Do while not rs.EOF

if Request.Form("Object") = rs("Object") then

Response.Write "<OPTION VALUE = '" & oRS ("Object") & "' SELECTED>"

Response.Write rs("Object") & "</Option>"

rs.MoveNext

else

Response.Write "<OPTION VALUE = '" & rs ("Object") & "'>"

Response.Write rs("CourseName") & "</Option>"

rs.MoveNext

end if

loop
TIA

Z
zion4ever author 8/7/2008

Never mind. I didn't reaad your post too well. :-) Visual tab. I see
Thnx