Check Box Multi Select Search (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


nettop -> Check Box Multi Select Search (11/11/2005 16:56:39)

Hi:

I'm trying to create a Check Box, multi select function. Only the single check per field works. Please check it out at http://www.paramountbusinessbrokers.com/listings/default.asp . Here's the current code. Thanks, Tim
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Current Listings</title>
<meta name="Microsoft Border" content="tb">
</head>
<body>
<%
strOddColor = "bgcolor='#FFFFFF'"
strEvenColor = "bgcolor='#DCCFC3'"
intLineNum = 0
%>
<form BOTID="0" METHOD="POST" action="default.asp">
	<input type="hidden" name="fpdbr_0_PagingMove" value="  |<  ">
	<table BORDER="0" width="464">
		<tr>
			<td> </td>
			<td><input type="checkbox" name="Search_ALL" value="ON"> <b>SEARCH 
			ALL</b></td>
		</tr>
		<tr>
			<td><b>Type</b></td>
			<td><input type="checkbox" name="Type" value="Auto Related">
			<font face="Arial" size="2">Auto Related</font> <br>
			<input type="checkbox" name="Type" value="Business Services">
			<font face="Arial" size="2">Business Services</font> <br>
			<input type="checkbox" name="Type" value="Personal Services">
			<font face="Arial" size="2">Personal Services</font> <br>
			<input type="checkbox" name="Type" value="Restaurant">
			<font face="Arial" size="2">Restaurant<br>
			</font>
			<input type="checkbox" name="Type" value="Restaurant Related"><font face="Arial" size="2"> 
			Restaurant Related<br>
			</font><input type="checkbox" name="Type" value="Retail"><font face="Arial" size="2"> 
			Retail</font>  </td>
		</tr>
		<tr>
			<td><b>Area</b></td>
			<td><font face="Arial" size="2">
			<input type="checkbox" name="Area" value="Greater Sacramento Area"> 
			Greater Sacramento Area</font>  <br>
			<font face="Arial" size="2">
			<input type="checkbox" name="Area" value="Sierra Foothills - Auburn Area"></font>
			<font face="Arial" size="2">Sierra Foothills - Auburn Area</font>
			<br>
			<font face="Arial" size="2">
			<input type="checkbox" name="Area" value="Sierra Foothills - Grass Valley Area"> 
			Sierra Foothills - Grass Valley Area</font> <br>
			<font face="Arial" size="2">
			<input type="checkbox" name="Area" value="Sierra Foothills - I-80 and Hwy 49"></font>
			<font face="Arial" size="2">Sierra Foothills - I-80 and Hwy 49</font></td>
		</tr>
	</table>
	<br>
	<input TYPE="Submit"><input TYPE="Reset"><p> </p>
</form>
<p align="center"><b><font color="#111111" size="6" face="Arial">BUSINESSES FOR SALE</font></b></p>
<table width="100%" border="1" cellspacing="0" bordercolor="#26265F">
  <thead>
    <tr>
      <th bgcolor="#DCCFC3"><b><font face="Arial" size="2">Listing #</font></b></th>
      <th bgcolor="#DCCFC3"><font face="Arial" size="2"><b>Description
      <font color="#ff0000">(click to view details)</font></b></font></th>
      <td align="center" bgcolor="#DCCFC3"><font face="Arial" size="2"><b>Type</b></font></td>
      <td align="center" bgcolor="#DCCFC3"><font face="Arial" size="2"><b>
      Area</b></font></td>
      <td align="center" bgcolor="#DCCFC3"><font face="Arial" size="2"><b>Price</b></font></td>
      <td align="center" bgcolor="#DCCFC3"><font face="Arial" size="2"><b>Status</b></font></td>
         </tr>
  </thead>
  <tbody>
 <!--#include file="../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<% end if %>
<%
fp_sQry="SELECT * FROM Results WHERE (Type like  '::Type::' AND Area like '::Area::') ORDER BY ID DESC"
fp_sDefault="Type=%&Area=%"
fp_sNoRecords="<tr><td colspan=6 align=""LEFT"" width=""100%"">No records returned.</td></tr>"
fp_sDataConn="listings"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=50
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&ID=3&_1_description_and_price=202&Business_name=202&Street_Address=202&City=202&State=202&Zip=202&Type=202&_2_Area=202&Detailed_Description=203&Ownership_Structure=202&_4_Employees=202&_5_Year_Established=202&_6_Seats=202&_7_Parking=202&_8_Licenses_Required=202&_9_Hrs_Open=202&_10_Sq_Ft_Size=202&_11_Lease_Term=202&_12_Lease_Options=202&_13_Base_Rent=202&_14_Last_Years_Annual_Gross=202&_15_Annual_Adjusted_Net_Profit=202&_16_COGS=202&_17_Inventory=202&Remote_computer_name=202&User_name=202&Browser_type=202&Timestamp=135&Misc_1=202&Misc_2=202&Misc_3=202&Misc_4=3&Operation_Desc_1=202&MiscO9=202&MiscO10=202&Payroll_detailF4=202&Misc1F8=202&Misc2F9=202&Misc3F10=202&Misc_31=203&photo1_sm=202&photo1_lg=202&photo2_sm=202&photo2_lg=202&photo3_sm=202&photo3_lg=202&photo4_sm=202&photo4_lg=202&photo5_sm=202&photo5_lg=202&photo6_sm=202&photo6_lg=202&photo7_sm=202&photo7_lg=202&photo8_sm=202&photo8_lg=202&Owners_First_Name=202&Owners_Last_Name=202&Owners_Mailing_Address=202&Owners_City=202&Owners_State=202&Owners_Zip=202&Owners_Home_Phone=202&Owners_Cell_Phone=202&Owners_Fax=202&Owners_Email1=202&Owners_Email2=202&Area=202&Misc_5=202&"
fp_iDisplayCols=6
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<%
intLineNum = intLineNum + 1
If intLineNum Mod 2 = 0 Then
strLineColor = strEvenColor
Else
strLineColor = strOddColor
End If
%>
<tr <%=strLineColor%>>   
      <td><font size="2" face="Arial"><%=FP_FieldVal(fp_rs,"ID")%></font></td> 
      <td><font size="2" face="Arial"> <a href="detail.asp?ID=<%=FP_FieldURL(fp_rs,"ID")%>"><%=FP_FieldVal(fp_rs,"_1_description_and_price")%></font></td>
      <td><font size="2" face="Arial"><%=FP_FieldVal(fp_rs,"Type")%></font></td>
      <td><font size="2" face="Arial"><%=FP_FieldVal(fp_rs,"Area")%></font></td>
      <td><font size="2" face="Arial"><align="right"><%=FormatCurrency(FP_FieldVal(fp_rs,"Misc_4"),0)%></font></td>
      <td><font size="2" face="Arial"><%=FP_FieldVal(fp_rs,"Misc_2")%></font></td>
    </tr>
<!--#include file="../_fpclass/fpdbrgn2.inc"-->
</tbody>
</table>
</body>
</html>




rdouglass -> RE: Check Box Multi Select Search (11/11/2005 21:32:11)

quote:

Type like '::Type::'


A coupla' things I can see. First is generally speaking, you'd use the LIKE command with the wildcard "%" like so:

Type like '%::Type::%'

where that would be equivalent to "contains". And

Type like '%::Type::'
Type like '::Type::%'

would be begins with and ends with respectively.

Now the second part of your issue (if you want to select multiple elements) is the inherent limitations of the DRW as I see it. The problem is, lets say we want to include 2 of the "Type" checkboxes. We'd need the SQL statement to look like:

(Type like '%::Type::%') OR (Type like '%::Type::%')

and so we'd need to separate the two returned values and create the SQL on the fly. [:'(] Not difficult if you're comfortable with ASP but there is, IMO, an easier way. I'd suggest changing the checkbox values to some kind of numerical values. For instance, if you keep the checkbox values in a database table and use the ID's of the records (the checkbox items), then you can do something like:

Type IN ::Type::

To me, a whole lot simpler. Of course, you'd need the numerical value in the records being searched instead of the text values but you should probably do that / have done that to normalize your database anyways.

Did that help or confuse? Do you think the numeric approach is feasable or are you up to a big ASP exersize in building SQL dynamically?

Hope that helps.




nettop -> RE: Check Box Multi Select Search (11/16/2005 9:19:40)

I like your idea to add values to the types. I will have to add that field to the database. I'll give it a try and get back to you as I'm sure I'll have some further questions/challenges with that. Thanks, Tim




nettop -> RE: Check Box Multi Select Search (12/4/2005 2:22:35)

Well, I've updated the database by reconstructing it and adding a few new fields with area_number and type_number to allow for searching with check boxes in a simpler manner as you've described. I've added form elements, but can't get them to work. The page is at http://www.paramountbusinessbrokers.com/12_default.asp (but it currently gives an error) and here's the code so far (Thanks for your help, Tim):

<table border="0" width="100%">
<tr>
<td width="1%" align="left" valign="top"> </td>
<td width="72%" align="left" valign="top">
<p align="center"><b><font color="#111111" size="6" face="Arial">BUSINESSES FOR SALE</font></b></p>
</td>
</tr>
</table>
<p></p>
</div>
</form>

		<div align="center">
			<form BOTID="0" METHOD="POST" action="12_default.asp">
				<input type="hidden" name="fpdbr_0_PagingMove" value="  |<  ">
				<table BORDER="0" width="95%">
					<tr>
						<td><b>Search Areas</b></td>
						<td>
						<input type="checkbox" name="Area_Number" value="<%=Server.HtmlEncode(Request("Area_Number='1'"))%>">Grass 
						Valley/Nevada City Areas<br>
						<input type="checkbox" name="Area_Number" value="<%=Server.HtmlEncode(Request("Area_Number='2'"))%>">Auburn 
						Area<br>
						<input type="checkbox" name="Area_Number" value="<%=Server.HtmlEncode(Request("Area_Number='3'"))%>">Greater 
						Sacramento Area<br>
						<input type="checkbox" name="Area_Number" value="<%=Server.HtmlEncode(Request("Area_Number=%"))%>">All 
						Areas</td>
					</tr>
					<tr>
						<td><b>Search by Business Types</b></td>
						<td>
						<input type="checkbox" name="Type_Number" value="<%=Server.HtmlEncode(Request("Type_Number='1'"))%>">  
						Manufacturing<br>
						<input type="checkbox" name="Type_Number" value="<%=Server.HtmlEncode(Request("Type_Number='2'"))%>">  
						Service Related<br>
						<input type="checkbox" name="Type_Number" value="<%=Server.HtmlEncode(Request("Type_Number='3'"))%>">  
						Retail-Related<br>
						<input type="checkbox" name="Type_Number" value="<%=Server.HtmlEncode(Request("Type_Number='4'"))%>">  
						Wholesale/Distribution<br>
						<input type="checkbox" name="Type_Number" value="<%=Server.HtmlEncode(Request("Type_Number='5'"))%>">  
						Restaurant/Food Service<br>
						<input type="checkbox" name="Type_Number" value="<%=Server.HtmlEncode(Request("Type_Number='6'"))%>">  
						Auto Related<br>
						<input type="checkbox" name="Type_Number" value="<%=Server.HtmlEncode(Request("Type_Number='7'"))%>">  
						Constructions Related<br>
						<input type="checkbox" name="Type_Number" value="<%=Server.HtmlEncode(Request("Type_Number='8'"))%>">  
						Markets/Grocery/Liquor<br>
						<input type="checkbox" name="Type_Number" value="<%=Server.HtmlEncode(Request("Type_Number='9'"))%>">  
						Hotels/Motels/B&B’s<br>
</td>
					</tr>
				</table>
				<br>
				<input TYPE="Submit"><input TYPE="Reset"></form>
			<table width="100%" border="1">
				<thead>
					<tr>
						<th ALIGN="LEFT"><b>ID</b></th>
						<th ALIGN="LEFT"><b>Description_and_price</b></th>
						<th ALIGN="LEFT"><b>Type</b></th>
						<th ALIGN="LEFT"><b>Area</b></th>
						<th ALIGN="LEFT"><b>Price</b></th>
						<th ALIGN="LEFT"><b>Status</b></th>
					</tr>
				</thead>
				<tbody>
<!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<% end if %>
<%
fp_sQry="SELECT * FROM Results WHERE (Area_Number IN ::Area_Number:: AND Type_Number IN ::Type_Number::) ORDER BY ID DESC"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=6 align=""LEFT"" width=""100%"">No records returned.</td></tr>"
fp_sDataConn="listings12"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=10
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&ID=3&Description_and_price=202&Business_name=202&Street_Address=202&City=202&State=202&Zip=202&Detailed_Description=203&Ownership_Structure=202&Type=202&Type_Number=3&Price=202&Area=202&Area_Number=3&Status=202&Status_Number=3&Page=202&Revenues=202&Adjusted_Net=202&Misc1=202&Misc2=202&Misc3=202&Misc4=202&Profile=202&Financial=202&Photos=202&CA=202&photo1_sm=202&photo1_lg=202&photo2_sm=202&photo2_lg=202&photo3_sm=202&photo3_lg=202&photo4_sm=202&photo4_lg=202&photo5_sm=202&photo5_lg=202&photo6_sm=202&photo6_lg=202&photo7_sm=202&photo7_lg=202&photo8_sm=202&photo8_lg=202&Owners_First_Name=202&Owners_Last_Name=202&Owners_Mailing_Address=202&Owners_City=202&Owners_State=202&Owners_Zip=202&Owners_Home_Phone=202&Owners_Cell_Phone=202&Owners_Fax=202&Owners_Email1=202&Owners_Email2=202&Timestamp=135&"
fp_iDisplayCols=6
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<tr>
						<td>
<%=FP_FieldVal(fp_rs,"ID")%></td>
						<td>
<%=FP_FieldVal(fp_rs,"Description_and_price")%></td>
						<td>
<%=FP_FieldVal(fp_rs,"Type")%></td>
						<td>
<%=FP_FieldVal(fp_rs,"Area")%></td>
						<td>
<%=FP_FieldVal(fp_rs,"Price")%></td>
						<td>
<%=FP_FieldVal(fp_rs,"Status")%></td>
					</tr>
<!--#include file="_fpclass/fpdbrgn2.inc"-->
</tbody>
			</table>




BeTheBall -> RE: Check Box Multi Select Search (12/4/2005 16:36:45)

You need parenthesis around whatever comes after IN. See if this helps any?

fp_sQry="SELECT * FROM Results WHERE (Area_Number IN (::Area_Number::) AND Type_Number IN (::Type_Number::)) ORDER BY ID DESC"




nettop -> RE: Check Box Multi Select Search (12/4/2005 18:00:51)

I have made your suggested change. Still not fixed. Do I have my selections right for each of the checkboxes. Here's a couple of examples of what I have for the field 'Type_Number':

<input type="checkbox" name="Type_Number1" value="<%=Server.HtmlEncode(Request("Type_Number='1'"))%>"> 
Manufacturing<br>
<input type="checkbox" name="Type_Number2" value="<%=Server.HtmlEncode(Request("Type_Number='2'"))%>"> 
Service Related<br>

Should it be something more like this???:

<input type="checkbox" name="Type_Number1" value="1"))%>"> Manufacturing<br>
<input type="checkbox" name="Type_Number2" value="2"))%>"> 
Service Related<br>




nettop -> RE: Check Box Multi Select Search (12/5/2005 9:38:54)

I was thinking about this some more. Should it be something more like this, where the name is just 'Type_Number', since that's what's in the query??? Thanks, Tim:

<input type="checkbox" name="Type_Number" value="1"))%>"> Manufacturing<br>
<input type="checkbox" name="Type_Number" value="2"))%>">
Service Related<br>




rdouglass -> RE: Check Box Multi Select Search (12/5/2005 9:49:24)

quote:

Should it be something more like this


That's how you should do it if you're using the IN clause as above. At least IMO.




BeTheBall -> RE: Check Box Multi Select Search (12/5/2005 10:41:26)

quote:

<input type="checkbox" name="Type_Number" value="1"))%>"> Manufacturing<br>
<input type="checkbox" name="Type_Number" value="2"))%>">
Service Related<br>


You wouldn't want the script delimiter in there (%>). More like this:

<input type="checkbox" name="Type_Number" value="1"> Manufacturing<br>
<input type="checkbox" name="Type_Number" value="2">
Service Related<br>




nettop -> RE: Check Box Multi Select Search (12/5/2005 23:40:52)

That works now when I happen to select the right grouping...for example, 'Retail Related' and 'Grass Valley Area'. Check it out at:

What needs to be edited to get 'ALL LISTINGS' to show up by default?

Thanks, Tim

<form BOTID="0" METHOD="POST" action="12_default.asp">
				<input type="hidden" name="fpdbr_0_PagingMove" value="  |<  ">
				<div align="center">
					<table border="2" width="98%" cellspacing="0" bordercolor="#111111">
						<tr>
							<td>
							<div align="center">
								<table border="0" width="96%" cellspacing="0">
									<tr>
										<td align="left" valign="top" colspan="2">
										<font face="Arial"><b>SEARCH OUR 
										BUSINESSES FOR SALE LISTINGS.</b>
										<font size="2"> Just check the 
										boxes that fit your type and location of 
										business, and then press the “Search” 
										button.</font></font></td>
									</tr>
									<tr>
										<td align="left" valign="top"> </td>
										<td align="left" valign="top"> </td>
									</tr>
									<tr>
										<td align="left" valign="top"><b>Search by Business Types<br>
										</b>
										
						<input type="checkbox" name="Type_Number" value="1"> Manufacturing<br>
						<input type="checkbox" name="Type_Number" value="2">Service Related<br>
						<input type="checkbox" name="Type_Number" value="3">Retail-Related<br>
						<input type="checkbox" name="Type_Number" value="4">Wholesale/Distribution<br>
						<input type="checkbox" name="Type_Number" value="5">Restaurant/Food Service<br>
						<input type="checkbox" name="Type_Number" value="6">Auto Related<br>
						<input type="checkbox" name="Type_Number" value="7">Constructions Related<br>
						<input type="checkbox" name="Type_Number" value="8">Markets/Grocery/Liquor<br>
						<input type="checkbox" name="Type_Number" value="9">Hotels/Motels/B&B’s</td>
										<td align="left" valign="top"><b>Search Areas<br>
										</b>
						<input type="checkbox" name="Area_Number" value="1">Grass Valley/Nevada City Areas<br>
						<input type="checkbox" name="Area_Number" value="2">Auburn Area<br>
						<input type="checkbox" name="Area_Number" value="3">Greater Sacramento Area<br>
<p> </p>
										<p><br>
				<input TYPE="submit" value="Search"></td>
									</tr>
								</table>
							</div>
							</td>
						</tr>
					</table>
				</div>
</form>
			<table width="100%" border="1" cellspacing="0" bordercolor="#111111">
				<thead>
					<tr>
						<th ALIGN="LEFT"><font face="Arial" size="2"><b>ID</b></font></th>
						<th ALIGN="LEFT"><font face="Arial" size="2"><b>Description</b></font></th>
						<th ALIGN="LEFT"><font face="Arial" size="2"><b>Type</b></font></th>
						<th ALIGN="LEFT"><font face="Arial" size="2"><b>Area</b></font></th>
						<th ALIGN="LEFT"><font face="Arial" size="2"><b>Price</b></font></th>
						<th ALIGN="LEFT"><font face="Arial" size="2"><b>Status</b></font></th>
					</tr>
				</thead>
				<tbody>
<!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<% end if %>
<%
fp_sQry="SELECT * FROM Results WHERE (Area_Number IN (::Area_Number::) AND Type_Number IN (::Type_Number::)) ORDER BY ID DESC"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=6 align=""LEFT"" width=""100%"">No records returned.</td></tr>"
fp_sDataConn="listings12"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=10
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&ID=3&Description_and_price=202&Business_name=202&Street_Address=202&City=202&State=202&Zip=202&Detailed_Description=203&Ownership_Structure=202&Type=202&Type_Number=3&Price=202&Area=202&Area_Number=3&Status=202&Status_Number=3&Page=202&Revenues=202&Adjusted_Net=202&Misc1=202&Misc2=202&Misc3=202&Misc4=202&Profile=202&Financial=202&Photos=202&CA=202&photo1_sm=202&photo1_lg=202&photo2_sm=202&photo2_lg=202&photo3_sm=202&photo3_lg=202&photo4_sm=202&photo4_lg=202&photo5_sm=202&photo5_lg=202&photo6_sm=202&photo6_lg=202&photo7_sm=202&photo7_lg=202&photo8_sm=202&photo8_lg=202&Owners_First_Name=202&Owners_Last_Name=202&Owners_Mailing_Address=202&Owners_City=202&Owners_State=202&Owners_Zip=202&Owners_Home_Phone=202&Owners_Cell_Phone=202&Owners_Fax=202&Owners_Email1=202&Owners_Email2=202&Timestamp=135&"
fp_iDisplayCols=6
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<tr>
						<td>
<font face="Arial" size="2">
<%=FP_FieldVal(fp_rs,"ID")%></font></td>
						<td>
<font face="Arial" size="2">
<%=FP_FieldVal(fp_rs,"Description_and_price")%></font></td>
						<td>
<font face="Arial" size="2">
<%=FP_FieldVal(fp_rs,"Type")%></font></td>
						<td>
<font face="Arial" size="2">
<%=FP_FieldVal(fp_rs,"Area")%></font></td>
						<td>
<font face="Arial" size="2">
<%=FP_FieldVal(fp_rs,"Price")%></font></td>
						<td>
<font face="Arial" size="2">
<%=FP_FieldVal(fp_rs,"Status")%></font></td>
					</tr>
<!--#include file="_fpclass/fpdbrgn2.inc"-->






Spooky -> RE: Check Box Multi Select Search (12/6/2005 0:33:31)

By default, do you mean when the page is first visited show all records?




nettop -> RE: Check Box Multi Select Search (12/6/2005 0:47:16)

Yes.

The second issue is that I need a search return value to show 'No Records Match Your Search Critieria, Please Try Again' if they select something that is not in the database.

Thanks, Tim




Spooky -> RE: Check Box Multi Select Search (12/6/2005 2:16:56)

Isnt this what you mean?

http://www.frontpagewebmaster.com/m-302654/tm.htm




nettop -> RE: Check Box Multi Select Search (12/6/2005 9:54:41)

So this would replace the

fp_sQry="SELECT * FROM Results WHERE (Area_Number IN (::Area_Number::) AND Type_Number IN (::Type_Number::)) ORDER BY ID DESC"

row? Thanks, Tim




BeTheBall -> RE: Check Box Multi Select Search (12/6/2005 13:52:06)

Does adding default values solve it? For example:

fp_sDefault="Type_Number=1,2,3,4,5,6,7,8,9&AreaNumber=1,2,3"




nettop -> RE: Check Box Multi Select Search (12/6/2005 20:45:19)

YES, you are BRILLIANT!!! Check it out at http://www.paramountbusinessbrokers.com/12_default.asp and note that it works GREAT!!!! Thanks so much, Tim




nettop -> RE: Check Box Multi Select Search (12/6/2005 20:46:13)

Do you have any suggestions on adding a 'Select All' checkbox and a 'DeSelect All' checkbox to this page? Thanks, Tim




BeTheBall -> RE: Check Box Multi Select Search (12/6/2005 23:00:35)

You will need to do that in javascript.

Here's one:

http://www.shiningstar.net/articles/articles/javascript/checkboxes.asp?ID=AW

Here's another:

http://javascript.internet.com/forms/check-all-toggle-switch.html

If neither of these meet your needs, do a google on javascript check all.




BeTheBall -> RE: Check Box Multi Select Search (12/6/2005 23:06:23)

One other little tip. It is a bit annoying that one has to scroll down to see the results of the search. To remedy this, change this line:

<form BOTID="0" METHOD="POST" action="12_default.asp">

to:

<form BOTID="0" METHOD="POST" action="12_default.asp#results">

Then edit these lines:

<input TYPE="Submit"><input TYPE="Reset"></form>
<table width="100%" border="1">

to:

<input TYPE="Submit"><input TYPE="Reset"></form>
<a name="results"></a>
<table width="100%" border="1">

That should cause the page to jump to the results when the form is submitted.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.125