<select> html help.

Status
Not open for further replies.

E3

Ars Centurion
387
Right now, I have a Recordset("Country").
I was wondering if I could pass the set to the listbox as the default highlighted text so that the user can do without reselecting the Country again. I ve tried using <Selected>, but it only works by recreating the selected entry in the listbox.

Is there any easier way? because I have more then a dozen entries in the box, that probaby means I may need to write a big loop.

:rolleyes: :(
 

cikkolata

Ars Scholae Palatinae
836
Okay, I'd do something like this:
Create an array (I'll call it countries).. then..

<%
For Each country in countries
Response.Write("<option name='" & country & "'")

If Recordset("Country") == country Then
Response.Write(" selected>")
Else
Response.Write(">")
End If
Next
%>

Please excuse my ASP, I've never really touched it before, so I might be wrong in places, I'm just saying that's how I'd go about it..
I still think PHP is better :p
 
Status
Not open for further replies.