I need this dropdown to select only artists, ie from the authortwo field where in another field, ie extrathree, the word yes is written.
Expand|Select|Wrap|Line Numbers
- <form method="Post">
- <div>
- <select onChange="window.location='' + this.options[this.selectedIndex].value">
- <OPTION VALUE = 'artists'> artists</Option>
- <OPTION>-----------------------------------------------------</Option>
- <%
- Set oRs=Server.CreateObject("adodb.recordset")
- strSQL = "SELECT DISTINCT AuthorTwo FROM tblGreetingPostCards ORDER BY AuthorTwo"
- oRs.Open strSQL, conn
- Do while not oRs.EOF
- if Request.Form("GreetingPostCards") = oRs("AuthorTwo") then 'if this is the selected one then display as selected
- Response.Write "<OPTION VALUE = '" & oRS ("AuthorTwo") & "' SELECTED>"
- Response.Write oRs("AuthorTwo") & "</Option>"
- oRs.MoveNext
- else
- Response.Write "<OPTION VALUE = 'http://www.mysite.com/artgallery.asp?AuthorTwo=" & oRs ("AuthorTwo") & "'> "
- Response.Write oRs("AuthorTwo") & "</Option>"
- oRs.MoveNext
- end if
- loop
- %>
- </SELECT>
- </div>
- </form>
Expand|Select|Wrap|Line Numbers
- <%
- If InStr(rsCard("extrathree"),"yes") > 0 Then
- %>
- <I><a href="portfol.asp?authortwo=<%=rsCard("authortwo")%>" title="">info </I><a>
- <%
- Else
- %>
- <%
- End If
- %>
Thanks in advance
Richard