mstabrey
Posts: 4 Joined: 2/28/2008 Status: offline
|
RE: Ignoring blank/empty fields with DRW - 2/29/2008 2:57:21
Thanks Roger! A bit of background first - the search process happens across three pages. Page 1 has the search form. Page 2 returns the results, but only the "Book Title" field is displayed as a hyperlink. Page 3 displays all the details of the relevant book - clicked through from page 2. I have pasted the search form from page 1 and DBW from page 2. Search Form __________ <form method="post" action="searchresults.asp" />
<input type="hidden" name="fpdbr_0_PagingMove" value=" |< " />
<p class="Head2">South African Children's Books in Print (SACBIP)</p>
<table>
<tr>
<td style="width: 85px"><p class="smalleft">Book Title</p></td>
<td colspan="4">
<input name="BookTitle" type="text" style="width: 265px; height: 20px;" class="sacbip" value='<%=Server.HtmlEncode(Request("BookTitle"))%>' /></td></tr>
<tr>
<td style="width: 85px"><p class="smalleft">Author Surname</p></td>
<td colspan="4">
<input name="AuthorSurname" type="text" style="width: 265px" class="sacbip" value='<%=Server.HtmlEncode(Request("AuthorSurname"))%>' /></td></tr>
<tr>
<td style="width: 85px"><p class="smalleft">Illustrator Surname</p>
</td>
<td colspan="4">
<input name="IllustratorSurname" type="text" style="width: 265px" class="sacbip" value='<%=Server.HtmlEncode(Request("IllustratorSurname"))%>' /></td></tr>
<tr>
<td style="width: 85px"><p class="smalleft">Geography:</p></td>
<td>
<select name="KeywordGeography" value='<%=Server.HtmlEncode(Request("KeywordGeography"))%>' class="sacbip" size="1">
<option value="%" selected="">Select ...</option>
<option>Cape Town</option>
<option>Johannesburg</option>
<option>Durban</option>
<option>Western Cape</option>
<option>Eastern Cape</option>
<option>Kwazulu-Natal</option>
<option>Gauteng</option>
<option>Free State</option>
<option>Mpumalanga</option>
<option>North-West</option>
<option>Northern Cape</option>
<option>Limpopo</option>
<option>Namibia</option>
<option>Botswana</option>
<option>Lesotho</option>
<option>Swaziland</option>
<option>Zimbabwe</option>
<option>Mozambique</option>
</select></td>
<td></td>
<td >
<p class="smalleft">Literary flavour:</p>
</td>
<td>
<select name="KeywordLiteraryFlavour" value='<%=Server.HtmlEncode(Request("KeywordLiteraryFlavour"))%>' class="sacbip" >
<option value="%" selected>Select ...</option>
<option>Funny</option>
<option>Light Humour</option>
<option>Normality</option>
<option>Strong Drama</option>
<option>Tragedy</option>
<option>Unreal Adventure</option>
<option>Fantasy</option>
<option>Folktale</option>
<option>Legend</option>
<option>Traditional Africa</option>
<option>Science Fiction</option>
<option>Space</option>
<option>Talking Animals</option>
</select></td></tr>
</table>
<div><br />
<input name="Submit" type="submit" value="Search" />
<input name="Reset" type="reset" value="Reset Search" /></div>
</form> DBW ____ <!--webbot bot="DatabaseRegionStart" s-columnnames="ID,BookTitle,OriginalTitle,Language,OtherLanguageEditions,CoverPicture,Publisher,Notes,YearFirstPublished,ISBN,SuggestedReadingAge,Genre,Awards,Format,Review,KeywordGeography,KeywordMainThemes,KeywordHistory,KeywordCentralCharacters,KeywordLiteraryFlavour,AuthorSurname,AuthorFirst Name,AuthorPicture,AuthorAwards,AuthorWebsite,IllustratorSurname,IllustratorFirst Name,IllustratorPicture,IllustratorAwards,IllustratorWebsite" s-columntypes="3,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202" s-dataconnection="SACBIP" b-tableformat="FALSE" b-menuformat="FALSE" s-menuchoice="BookTitle" s-menuvalue="BookTitle" b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="FALSE" s-recordsource="SACBIP" s-displaycolumns="BookTitle" s-criteria="[BookTitle] CNT {BookTitle} + [AuthorSurname] CNT {AuthorSurname} + [IllustratorSurname] CNT {IllustratorSurname} + [KeywordGeography] CNT {KeywordGeography} + [KeywordLiteraryFlavour] CNT {KeywordLiteraryFlavour} |" s-order="[BookTitle] +" s-sql="SELECT * FROM SACBIP WHERE (BookTitle LIKE '%::BookTitle::%' AND AuthorSurname LIKE '%::AuthorSurname::%' AND IllustratorSurname LIKE '%::IllustratorSurname::%' AND KeywordGeography LIKE '%::KeywordGeography::%' AND KeywordLiteraryFlavour LIKE '%::KeywordLiteraryFlavour::%') ORDER BY BookTitle ASC" b-procedure="FALSE" clientside="" suggestedext="asp" s-defaultfields="BookTitle=&AuthorSurname=&IllustratorSurname=&KeywordGeography=&KeywordLiteraryFlavour=" s-norecordsfound="No books were found that match your choice." i-maxrecords="0" i-groupsize="0" botid="0" u-dblib="_fpclass/fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc" u-dbrgn2="_fpclass/fpdbrgn2.inc" tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.</font></td></tr></table>" b-usedotnet="FALSE" currentext="" sa-inputtypes="202,202,202,202,202" b-datagridformat="FALSE" b-dgridalternate="TRUE" sa-crittypes="202,202,202,202,202" b-wastableformat="FALSE" startspan="" --><!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM SACBIP WHERE (BookTitle LIKE '%::BookTitle::%' AND AuthorSurname LIKE '%::AuthorSurname::%' AND IllustratorSurname LIKE '%::IllustratorSurname::%' AND KeywordGeography LIKE '%::KeywordGeography::%' AND KeywordLiteraryFlavour LIKE '%::KeywordLiteraryFlavour::%') ORDER BY BookTitle ASC"
fp_sDefault="BookTitle=&AuthorSurname=&IllustratorSurname=&KeywordGeography=&KeywordLiteraryFlavour="
fp_sNoRecords="No books were found that match your choice."
fp_sDataConn="SACBIP"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice="BookTitle"
fp_sMenuValue="BookTitle"
fp_sColTypes="&ID=3&BookTitle=202&OriginalTitle=202&Language=202&OtherLanguageEditions=202&CoverPicture=202&Publisher=202&Notes=202&YearFirstPublished=202&ISBN=202&SuggestedReadingAge=202&Genre=202&Awards=202&Format=202&Review=202&KeywordGeography=202&KeywordMainThemes=202&KeywordHistory=202&KeywordCentralCharacters=202&KeywordLiteraryFlavour=202&AuthorSurname=202&AuthorFirst Name=202&AuthorPicture=202&AuthorAwards=202&AuthorWebsite=202&IllustratorSurname=202&IllustratorFirst Name=202&IllustratorPicture=202&IllustratorAwards=202&IllustratorWebsite=202&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan="" i-checksum="70" --><p class="book">
<a href="searchresults-2.asp?BookTitle=<%=FP_FieldURL(fp_rs,"BookTitle")%>">
<!--webbot bot="DatabaseResultColumn" s-columnnames="ID,BookTitle,OriginalTitle,Language,OtherLanguageEditions,CoverPicture,Publisher,Notes,YearFirstPublished,ISBN,SuggestedReadingAge,Genre,Awards,Format,Review,KeywordGeography,KeywordMainThemes,KeywordHistory,KeywordCentralCharacters,KeywordLiteraryFlavour,AuthorSurname,AuthorFirst Name,AuthorPicture,AuthorAwards,AuthorWebsite,IllustratorSurname,IllustratorFirst Name,IllustratorPicture,IllustratorAwards,IllustratorWebsite" s-column="BookTitle" b-tableformat="FALSE" b-hashtml="FALSE" b-makelink="FALSE" clientside="" b-menuformat="" preview="<font size="-1"><<</font>BookTitle<font size="-1">>></font>" s-columntypes="3,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202" startspan="" --><%=FP_FieldVal(fp_rs,"BookTitle")%><!--webbot bot="DatabaseResultColumn" endspan="" i-checksum="19565" --></a></p>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside="" tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the end of a Database Results region.</font></td></tr></table>" startspan="" --><!--#include file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan="" i-checksum="62730" --></div> Phew! Cheers Mart
< Message edited by rdouglass -- 2/29/2008 14:13:58 >
|