Form and Context Searching -Hideif/Showif

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 33377
interpreted = N
texte = Thanks John...I want a single search.tpl to work 2 ways -- as a form search with user input or as a search list... Search 1:::I'm allowing searching with a group of fields in a form:
Descriptions and by Title: also from this same search.tpl I'm creating a list of links:Search 2:::[search db=products.db&geSKUdata=0&majorTypesumm=t&asmajorTypesort=1] [foundItems] [majorType]
[/foundItems] [/search]both go to one results.tplthe showif below works fine for the search context half (courtesy of my pal, John Butler)[showif [url][group1field][/url]=[url][raw][group1field][/raw][/url]] [search context stuff] [showif] and [hideif [url][group1field][/url]=[url][raw][group1field][/raw][/url]] [founditems] from form search [/founditems] [hideif]Question 1. Why does this work?? This hides the search context and tables fine. Is it that an input field will only = itself in a [raw] form when it is *nothing* Question 2. When I use the form search i have text on the results.tpl to this effect.The search for CDTitle+Type+Category found 4 itemswhich was The search for [group1field] found [numfound] items.Is there a way to get the value of group1field to display? Many ThanksCharley Conquest Fresh Music --- You wrote: When the var value is *not* coming from a db-[showif [url][someVar][/url]=[url][raw][someVar][/raw][/url]] someVar has not been given a value [/showif]It would work without the [url] wrappers so long as the input never included any comparison chars, which you generally cannot be sure of.****When the var value *is* coming from a db-[showif [url][someVar][/url]=] the field someVar of this record of this db has a literal value of *nothing* [/showif]It would work without the [url] wrappers so long as the field value never included any comparison chars, which you might not be sure of.-Johnchas wrote:> And.... how do you test for empty/not empty??? > --- end of quote ---------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Form and Context Searching -Hideif/Showif (John Butler 2000)
  2. Form and Context Searching -Hideif/Showif (chas@valley.net (chas) 2000)
Thanks John...I want a single search.tpl to work 2 ways -- as a form search with user input or as a search list... Search 1:::I'm allowing searching with a group of fields in a form: Descriptions and by Title: also from this same search.tpl I'm creating a list of links:Search 2:::[search db=products.db&geSKUdata=0&majorTypesumm=t&asmajorTypesort=1] [founditems] [cart]&type=[url][majorType][/url]&startat=1>[majorType]
[/foundItems] [/search]both go to one results.tplthe showif below works fine for the search context half (courtesy of my pal, John Butler)[showif [url][group1field][/url]=[url][raw][group1field][/raw][/url]] [search context stuff] [showif] and [hideif [url][group1field][/url]=[url][raw][group1field][/raw][/url]] [founditems] from form search [/founditems] [hideif]Question 1. Why does this work?? This hides the search context and tables fine. Is it that an input field will only = itself in a [raw] form when it is *nothing* Question 2. When I use the form search i have text on the results.tpl to this effect.The search for CDTitle+Type+Category found 4 itemswhich was The search for [group1field] found [numfound] items.Is there a way to get the value of group1field to display? Many ThanksCharley Conquest Fresh Music --- You wrote: When the var value is *not* coming from a db-[showif [url][someVar][/url]=[url][raw][someVar][/raw][/url]] someVar has not been given a value [/showif]It would work without the [url] wrappers so long as the input never included any comparison chars, which you generally cannot be sure of.****When the var value *is* coming from a db-[showif [url][someVar][/url]=] the field someVar of this record of this db has a literal value of *nothing* [/showif]It would work without the [url] wrappers so long as the field value never included any comparison chars, which you might not be sure of.-Johnchas wrote:> And.... how do you test for empty/not empty??? > --- end of quote ---------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ chas@valley.net (chas)

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:

[searchString] (1997) bug in [SendMail] (1997) Heads up, cookies *may* be outlawed in Europe (2001) [WriteFile] problems (1997) Subject: Authenticating users without dialog box (1997) $adminput doesn't allow [include] files (1997) unable to launch acgi in WebCat (1997) RE: Answer: WebDelivery downloads alias, not original ? (1997) Sort of a Dilema! (1998) mass mailing and mass hysteria (1998) Bug Report, maybe (1997) Help name our technology! (1997) Resume Catalog ? (1997) Help Wanted/Stowe, Vermont (2001) Multiple prices (1997) WebCat b15 Mac plug-in (1997) Sendmail Excel attachment (2003) [Webcat 2]Next (1997) Search with Special Chars (1997) emailer on Windows Beta 18 (1997)