Forum Moderators: open

Message Too Old, No Replies

drop-down menu

         

justify

3:06 pm on Jun 18, 2003 (gmt 0)

10+ Year Member



Hi, My problem is about drop down menu. i get the data from my database without problem and listing them. But i want to give a link each data which get from my database Do you have any suggestion?
My code is below

<%
Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "SELECT * FROM NEWS_SPECIALS ORDER BY DATE_CREATED DESC"
rs.open SQL, Con, 1, 3
deg = "<a href=info.asp?id=rs(CONTENT_ID)>"
deg = Server.URL.Encode(deg)
%>
<%= rs.recordcount %>
<form method="post" action="info.asp">
<select name="ozeldrop">
<%
Do While Not rs.EOF
%>
<option value="<%= deg %>"><%=rs("TITLE")%></option> </a>
<%
rs.MoveNext
Loop
%>
</select>
<input type="submit" value="send">
</form>

korkus2000

3:13 pm on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can do this to make your value the link:

<option value="<%=Server.URL.Encode("<a href=info.asp?id=" & rs(CONTENT_ID) & ">")%>"><%=rs("TITLE")%></option>

Not sure why you want this though instead of just passing the url and not the <a href=""> tag with it.