Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP XML Using ASP 3 and XML. See also the XML category for more XML discussions not relating to ASP. NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 30th, 2008, 12:43 AM
Authorized User
Join Date: Jun 2008
Location: , , .
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default multi checkbox problem

Hello, I have another problem. My thesis advisor ask me to make like this:

In my previous program, I make 1 drop down menu which consist of author, dates, category,etc.

If it looks like that, I just need 1 variable which is name of drop down menu.

Now, I was asked to make like this:
I have some check box which are: check box for author, check box for dates, check box for category, etc.
If I tick author, and type keyword "xyz" then the program only search for keyword "xyz" in scope author. The same condition if I want to tick author, category and title with keyword "xyz". Then, the program only search for keyword "xyz" in scope author, category and title.

Does anyone can help me?

Here is my ASP code:



 C_prefix = "contains("& f & ",'"
 C_midfix = "') or contains("& f &",'"
 C_suffix = "')"
Function CreateContainsList( fromStr )
    Dim temp, re

    ' the regexp ensures that multiple spaces become single spaces
    Set re = New RegExp
    re.Pattern = "\s+"
    re.Global = True
    ' so get an array of words via split...
    temp = Split( re.Replace( Trim(fromStr), " " ), " " )
    ' and make it into the contains list via join and helpers

    CreateContainsList = C_prefix & Join( temp, C_midfix ) & C_suffix

End Function

demo = request.Form("txtSearch")

and here is the path :
path="form/document[<%= CreateContainsList(request.Form("txtSearch"))%>]//*";
In this code:
C_prefix = "contains("& f & ",'"
C_midfix = "') or contains("& f &",'"
C_suffix = "')"

It will run only the variable is "f" if I click checkbox "type". But, how if I want to make it does not static like that? So, If I click checkbox "category", variable "f" change into variable "g" (depends on which checkbox that user click).

Thank you

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi Column - HTML printing problem ROCXY HTML Code Clinic 5 March 6th, 2008 10:53 AM
Problem with Multi-select for report parameter JimReid BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 January 30th, 2007 11:44 AM
Multi Checkbox selection - ASP cancer10 Classic ASP Databases 7 November 21st, 2006 01:00 AM
having problem Using Indexed properties with Multi kris_rathi79 Struts 0 June 27th, 2006 07:56 AM
multi-multi-multiple Insert with subquery??? jmjyiannis SQL Server 2000 1 May 5th, 2006 02:20 PM

All times are GMT -4. The time now is 11:38 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.