99bird
Posts: 15 Joined: 3/19/2004 Status: offline
|
Dropdown results page help needed - 3/4/2008 19:59:16
When I click on a name (designer) from a dropdown box (search.asp) generated from the database. It displays the products designed by that person on a results page (designer.asp). How do I get the unique desginer name to appear on the top of the results page? For reference, I have have listed the coding I am using below. I would appreciate any help. Search Page
<form BOTID="0" METHOD="POST" action="designer.asp" name="form3" style="width: 97px; height: 20">
<table BORDER="0" height="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td height="1"><nobr>
<!--#include file="_fpclass/fpdblib.inc"-->
<%
fp_sQry="SELECT DISTINCT designer FROM products ORDER by designer"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="lamp1"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=True
fp_sMenuChoice="designer"
fp_sMenuValue="product_name"
fp_sColTypes=""
fp_iDisplayCols=1
fp_fCustomQuery=True
BOTID=2
fp_iRegion=BOTID
%>
<select onchange=submit() NAME="price" "SIZE="1" style="border:1px solid #8A8A8A; font-family: Century Gothic; font-size: 8pt">
<option>By Designer</option>
<option></option>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<option><%=FP_FieldHtml(fp_rs,"designer")%></option>
<!--#include file="_fpclass/fpdbrgn2.inc"-->
</select></nobr></td>
</tr>
</table>
</form>
designer.asp
<!--#include file="_fpclass/di_dblib1.inc"-->
<%
fp_sQry="SELECT * FROM products WHERE (designer = '::designer::')"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=3 align=left width=""100%"">No records returned.</td></tr>"
fp_sDataConn="lamp1"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=9
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="category"
fp_sMenuValue="category"
fp_iDisplayCols=3
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
DI_Navigator = false
DI_cpColor = "green"
DI_NavAlign = "center"
DI_ShowProdPos = True
DI_pPane = "Prev"
DI_nPane = "Next"
DI_fPane = "First"
DI_lPane = "Last"
DI_PaneSize = 10
Dim DI_PageCnt, rCount
%>
<!--#include file="_fpclass/di_dbrgn12.inc"-->
<%
rCount=fp_rs.RecordCount
DI_PageCnt = CInt(fp_rs.PageCount)
%><%
count = count + 1
If count = 1 Then
%>
<%
End If
%><td height="33" width="780">
<p align="center" style="margin-top: 0; margin-bottom: 0">
<% If FP_FieldLink(fp_rs,"product_name")= "Blossom" then %>
<a href="javascript:;" onClick="MM_openBrWindow('detail11_3.asp?ID=<%=FP_FieldURL(fp_rs,"ID")%>&product_name=<%=FP_FieldURL(fp_rs,"product_name")%>','detail11b','resizable=yes,toolbar=yes,scrollbars=yes,width=700,height=461')">
<% Elseif FP_FieldLink(fp_rs,"product_name")= "Classique" then %>
<a href="javascript:;" onClick="MM_openBrWindow('detail11_2.asp?ID=<%=FP_FieldURL(fp_rs,"ID")%>&product_name=<%=FP_FieldURL(fp_rs,"product_name")%>','detail11c','resizable=yes,toolbar=yes,scrollbars=yes,width=700,height=461')">
<% Elseif FP_FieldLink(fp_rs,"product_name")= "X" then %>
<%Else%>
<a href="javascript:;" onClick="MM_openBrWindow('detail11_1.asp?ID=<%=FP_FieldURL(fp_rs,"ID")%>&product_name=<%=FP_FieldURL(fp_rs,"product_name")%>','detail11','resizable=yes,toolbar=yes,scrollbars=yes,width=700,height=600')">
<% end IF %>
<img border="0" src="<%=FP_FieldLink(fp_rs,"photoname1")%>" alt='<%=FP_FieldVal(fp_rs,"product_name")%> <%=FP_FieldVal(fp_rs,"category")%>'></a><font face="Century Gothic" size="2" color="#808080"><br>
<%=FP_FieldVal(fp_rs,"product_name")%> <%=FP_FieldVal(fp_rs,"pname2")%><br>
<%=FP_FieldVal(fp_rs,"category")%><br><%=FP_FieldVal(fp_rs,"designer")%>
</font><br> </td>
<%
If count = 3 Then
count = 0
%>
</tr>
<%
End If
%>
<!--#include file="_fpclass/di_dbrgn21.inc"-->
<Div><<%=DI_NavAlign%>><font face="Century Gothic" size="2" color="#5B5751">
<%
' Top Diplaying num records
Response.Write DI_ProductPos()%><br>
<%
' Top Navagation
Response.Write DI_Navigation()%>
</div>
</tbody>
</table>
<Div><<%=DI_NavAlign%>><font face="Century Gothic" size="2" color="#5B5751">
<%
' Bottom Displaying num records
Response.Write DI_ProductPos()%>
</div>
<%If count <> 0 Then Response.Write "</tr>"%>
</tbody>
< Message edited by Spooky -- 3/5/2008 1:03:59 >
|