Re: [WebDNA] hideif within a search

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 103126
interpreted = N
texte = Rich Kwas wrote: > I have a search where 2 choices are made from dropdowns. > > Item 1 is a category. > Item 2 lists a website where reviews might be found for listings within that category. > > There currently are 8 choices as well as "All" for that second Item. > > Item 2 is written like this within the db: > +3+50+51+ > and so on depending on the site ID etc > > > To show results for "All" as the 2nd choice I've inserted a [hideif] within the search: > > [Search db=^/ihr/ihr.db&eqVisibleDatarq=T&eqPreferredDatarq=No&woSECTIONSdatarq=[cat]&SECTIONSword=ww&namewbrk=+&SKUsort=1&SKUsdir=ra&allhit=1[hideif [reviewsites]=All]&woReviewSitesdatarq=[ReviewSites]&ReviewSitesword=ww&ReviewSiteswbrk=+[/hideif]] > > > This seems to be working fine, but I've never placed a hideif within a search in the past > > > My question..... > Is placing a [hideif] within a search acceptable? > > ...if not is there as easier way to find "All" if indicated in that second Item? > > > I'm using 6.0 on IIS....... > > > Thanks Hi Rich, sure, hideif's and any other code are just fine in there... however, you may benefit from the convention of setting a tSearchCriteria variable as follows: [switch value=[tReviewSites]] [case value=ALL] [text]tSearchCriteria=blah blah blah[/text] [/case] [default] [text]tSearchCriteria=Default blah blah[/text] [/default] [/switch] Then in the search: [search db=^/your/db.db&[tSearchCriteria]] lastly, depending on what possible values are in [cat] and [reviewsites].. you may want to consider wrapping them in [url][/url]'s in your search criteria. Donovan Donovan Brooke WebDNA Software Corporation http://www.webdna.us **[Square Bracket Utopia]** Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] hideif within a search (Terry Wilson 2009)
  2. Re: [WebDNA] hideif within a search (Donovan Brooke 2009)
  3. Re: [WebDNA] hideif within a search (Donovan Brooke 2009)
  4. Re: [WebDNA] hideif within a search ("Terry Wilson" 2009)
  5. Re: [WebDNA] hideif within a search (Donovan Brooke 2009)
  6. [WebDNA] hideif within a search (Rich Kwas 2009)
Rich Kwas wrote: > I have a search where 2 choices are made from dropdowns. > > Item 1 is a category. > Item 2 lists a website where reviews might be found for listings within that category. > > There currently are 8 choices as well as "All" for that second Item. > > Item 2 is written like this within the db: > +3+50+51+ > and so on depending on the site ID etc > > > To show results for "All" as the 2nd choice I've inserted a [hideif] within the search: > > [Search db=^/ihr/ihr.db&eqVisibleDatarq=T&eqPreferredDatarq=No&woSECTIONSdatarq=[cat]&SECTIONSword=ww&namewbrk=+&SKUsort=1&SKUsdir=ra&allhit=1[hideif [reviewsites]=All]&woReviewSitesdatarq=[ReviewSites]&ReviewSitesword=ww&ReviewSiteswbrk=+[/hideif]] > > > This seems to be working fine, but I've never placed a hideif within a search in the past > > > My question..... > Is placing a [hideif] within a search acceptable? > > ...if not is there as easier way to find "All" if indicated in that second Item? > > > I'm using 6.0 on IIS....... > > > Thanks Hi Rich, sure, hideif's and any other code are just fine in there... however, you may benefit from the convention of setting a tSearchCriteria variable as follows: [switch value=[tReviewSites]] [case value=ALL] [text]tSearchCriteria=blah blah blah[/text] [/case] [default] [text]tSearchCriteria=Default blah blah[/text] [/default] [/switch] Then in the search: [search db=^/your/db.db&[tSearchCriteria]] lastly, depending on what possible values are in [cat] and [reviewsites].. you may want to consider wrapping them in [url][/url]'s in your search criteria. Donovan Donovan Brooke WebDNA Software Corporation http://www.webdna.us **[Square Bracket Utopia]** Donovan Brooke

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

sendmail (2000) Re:[off] Promotions Co? (1997) Error Log.db --however (1997) PSC recommends what date format yr 2000??? (1997) overload (2002) Who's going to MacWorld? (1999) Can't add a field (1998) creating a ShipCosts database (1997) too many nested tags ... (1997) showif and cart (1997) Another question (1997) HomePage Caution (1997) Re:redirect from the errorsMessages.db entry (1997) [ShowIf] and empty fields (1997) emailer (1997) Help name our technology! I found it (1997) Fun with Dates - revisited (again) (1997) WebCat B13 Mac CGI -- Frames question (1997) Add to Cart & List of Products (1997) NT beta ReadMe missing (b12-b15) (1997)