codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Narrowing Advanced Search  theories99 at 14:19 on Thursday, August 14, 2008
 

Hi,

I have 4 columns set up for my advance search form (xsearchsortcaptions= ItemA,ItemB,ItemC,ItemD)
(xsearchsortfields=cname,extendeddesc,level4,alias) inside my database.

Now when I enter the search, then I check which field I want to look up in, then hit search it seems to populate with anything that might contain the reference. How can i make it so when i check the box for the search field it will ONLY look in the column it has be designated? Here is the page coding.

' table.std_table gives border to table and blue/grey background
' Second table has each element floated so that they will shift
' and balance when settings are removed
sub showAdvancedSearch
Dim othercount,i,stroOther
Dim OtherTypes(50), othercaptions(50), othercaptioncount
dim sortupdownnames(2),sortupdownvalues(2),sortupdowncount
dim strsearchsort, strsearchsortupdown

%>
<h1><%=getlang("LangSearch01")%></h1>
<form name="form1" method="Post" action="/forum/shopsearch_search_Yes.html">
<div class="std_table" style="overflow:auto;" style="height:140px">
<table class="fl" style="width:auto" style="height:auto">
<tr>
<td><%=getlang("langSearchAllWords")%></td>
<td><input name="allwords" type="text" id="allwords" class="txtfield" /></td>
</tr>-->
<tr>
<td><%=getlang("langSearchExactPhrase")%></td>
<td><input name="exact" type="text" id="exact" class="txtfield" /></td>
</tr>
<tr>
<td><%=getlang("langSearchAtLeast")%></td>
<td><input name="atleast" type="text" id="atleast" class="txtfield" /></td>
</tr>
<tr>
<td><%=getlang("langSearchWithoutWords")%></td>
<td><input name="without" type="text" id="without" class="txtfield" /></td>
</tr>
<tr>
<td><br><% makeFieldChooser %></td>
</tr>
</table>
</div>



**It also has this at the bottom of the page that interarcts with it.

sub makeFieldChooser
dim fieldString, fieldLength, captionString
fieldString = getconfig("xsearchfields")
captionString = getconfig("xsearchsortcaptions")
if captionstring="" then
captionstring=fieldstring
end if
dim fieldArray, captionArray
fieldArray = Split(fieldString,",")
captionArray = Split(captionString,",")
%>
<strong><%=getlang("langcommonsearch")%><%=getlang("langSearchFields")%></strong><br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%
Dim i
For i = 0 to Ubound(fieldArray)
%>
<tr>
<td width="30"><input type="checkbox" name="searchFields" value="<%=fieldArray(i)%>" unchecked></td>
<td align="left"><%=captionArray(i)%></td>
</tr>
<% Next %>
</table>


PLease help!! Thanks








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  image and form fieild upload problem
•  Multiplying currency
•  Java Garbage Collection Boot Camp
•  validations fo form fields
•  Setting page size at which scroll bars appear in browser window (javascript)
•  before executing a function
•  how to write a code in asp.net to create a glossary .
•  I am trying to run a programme which is using PGPLOT.When I call it from browser I get following error message.
•  Re: open excel file in html page


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010