Hi all, i would like to view a dropdown menu instead of the selection box created by ASPrunner.
this is the code:
Function BuildSelectControl(strName, strValue)
BuildSelectControl=""
Set rsTemp = server.CreateObject ("ADODB.Recordset")
strSQL =""
strSize = 1
if "Contact_Created_By" = strName then strSize = 5 : arr = Array("Rona", "Marcucci", "Pilo", "Muzzolon", "Grosoli") end if
if "Contact_Modified_By" = strName then strSize = 5 : arr = Array("Rona", "Marcucci", "Pilo", "Muzzolon", "Grosoli") end if
if strSQL <> "" then
rsTemp.open strSQL, dbConnection
if rsTemp.EOF then exit function
BuildSelectControl = BuildSelectControl & "<select size = " & strSize & " name=""" & strName & """>"
BuildSelectControl = BuildSelectControl & "<option value="""">Please select</option>"
while not rsTemp.Eof
if rsTemp(0)=strValue then
BuildSelectControl = BuildSelectControl & "<option value=""" & rsTemp(0) & """ selected>" & rsTemp(1) & "</option>"
else
BuildSelectControl = BuildSelectControl & "<option value=""" & rsTemp(0) & """>" & rsTemp(1) & "</option>"
end if
rsTemp.MoveNext
wend
BuildSelectControl = BuildSelectControl & "</select>"
rsTemp.Close
set rsTemp = Nothing
else
BuildSelectControl = BuildSelectControl & "<select size = " & strSize & " name=""" & strName & """>"
if CInt(strSize)<2 then _
BuildSelectControl = BuildSelectControl & "<option value="""">Please select</option>"
for ind=LBound(arr) to UBound(arr)
if arr(ind)=strValue then
BuildSelectControl = BuildSelectControl & "<option value=""" & arr(ind) & """ selected>" & arr(ind) & "</option>"
else
BuildSelectControl = BuildSelectControl & "<option value=""" & arr(ind) & """>" & arr(ind) & "</option>"
end if
next
BuildSelectControl = BuildSelectControl & "</select>"
end if
End Function
what i have to change to do it?
thanks all