Re: Pretty Easy I bet

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 35171
interpreted = N
texte = a var will only equal null when assigned that value - either on purpose via form var (that includes passed in URLs), or from if you getting a db field value where that field has no text in it yet (this includes orderfile headers).If a var is unititialized (not given a value by any means, then it's value = [var].[showif [URL][var1][/URL]=[URL][raw][var1][/raw][/URL]] var1 has not been initialized (if that is the right terminology... ie var1 has not been assigned a value [/showif]If you are using the XML webcat tags and parser then an unititialized var = undefined (I think. Someone correct me if I am wrong).Always take note if the var is potentially getting its value from: 1) a db field (incl. ordefile header) , or else 2) other means like formvar, [math], [text] , etc.HTH-Johnchas wrote:> Hi > > Search Page: > > I have a search page with 2 contexts > > one displays by a product Category > > one displays by Company > > Results Page > > I have two search contexts > > one shows results of the Category selection > > one shows results of the Company selection > > They both work, but > > I want to hide/show the empty search table and its founditems. > > I have put on the results page to test..... > > category = [category] > > company= [company] > > the context I want to hide = [fieldname] either the [Company] or the [Category] - not a value > > so I have tried: > > [showif [company]=[company]] > > for the category search results > > and > > [hideif [company]!] > > to test the null and therefore hide that context. > What am I missing? > > Thanks In Advance > > Charley Conquest > > results.tpl below > > > > > Results of Your Search > > > [Include file=HSI_Header.inc] > >
>
> Category = [category] >
>
> company = [company] > > [showif [category]=[category]] > [search db=products.db&eqCategorydata=[url][Category][/url]&asCategorysort=1&asCompanysort=2&max=10&startat=[url][startat][/url]] > >

Your search for [Category] found [numFound] items

> >

> Only the first 100 characters of product descriptions are displayed.
> To see a complete product description and a picture (if available) click on the Detail hypertext link.

> >

> > > > > > [foundItems] > > > > > > > > > [/foundItems] > >
CompanyTitleDescriptionPriceActions
[Company][title][description]$[format .2f][price][/format]Add to CartDetail
> > [shownext] > Show Items [start]-[end]
> [/shownext] >
> > [/search] > > [/showif] > > [showif [company]=[company]] > [search db=products.db&eqCompanydata=[url][Company][/url]&asCompanysort=1&max=10&startat=[url][startat][/url]] > >

Your search for [hideif [category]!Strings]'[Category]'[/hideif] [hideif [category]=Strings]'[COMPANY]'[/hideif] found [numFound] items

> >

> Only the first 100 characters of product descriptions are displayed.
> To see a complete product description and a picture (if available) click on the Detail hypertext link.

> >

> > > > > > [foundItems] > > > > > > > > > [/foundItems] > >
CompanyTitleDescriptionPriceActions
[Company][title][description]$[format .2f][price][/format]Add to CartDetail
> > [shownext] > Show Items [start]-[end]
> [/shownext] >
> > [/search] > [/showif] > > Show Shopping Cart
> Back To Search
> > > > > ------------------------------------------------------------- > 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/ ------------------------------------------------------------- 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: Pretty Easy I bet (chas@valley.net (chas) 2000)
  2. Re: Pretty Easy I bet (John Butler 2000)
  3. Pretty Easy I bet (chas@valley.net (chas) 2000)
a var will only equal null when assigned that value - either on purpose via form var (that includes passed in URLs), or from if you getting a db field value where that field has no text in it yet (this includes orderfile headers).If a var is unititialized (not given a value by any means, then it's value = [var].[showif [url][var1][/URL]=[url][raw][var1][/raw][/URL]] var1 has not been initialized (if that is the right terminology... ie var1 has not been assigned a value [/showif]If you are using the XML webcat tags and parser then an unititialized var = undefined (I think. Someone correct me if I am wrong).Always take note if the var is potentially getting its value from: 1) a db field (incl. ordefile header) , or else 2) other means like formvar, [math], [text] , etc.HTH-Johnchas wrote:> Hi > > Search Page: > > I have a search page with 2 contexts > > one displays by a product Category > > one displays by Company > > Results Page > > I have two search contexts > > one shows results of the Category selection > > one shows results of the Company selection > > They both work, but > > I want to hide/show the empty search table and its founditems. > > I have put on the results page to test..... > > category = [category] > > company= [company] > > the context I want to hide = [fieldname] either the [Company] or the [Category] - not a value > > so I have tried: > > [showif [company]=[company]] > > for the category search results > > and > > [hideif [company]!] > > to test the null and therefore hide that context. > What am I missing? > > Thanks In Advance > > Charley Conquest > > results.tpl below > > > > > Results of Your Search > > > [Include file=HSI_Header.inc] > >
>
> Category = [category] >
>
> company = [company] > > [showif [category]=[category]] > [search db=products.db&eqCategorydata=[url][Category][/url]&asCategorysort=1&asCompanysort=2&max=10&startat=[url][startat][/url]] > >

Your search for [Category] found [numFound] items

> >

> Only the first 100 characters of product descriptions are displayed.
> To see a complete product description and a picture (if available) click on the Detail hypertext link.

> >

> > > > > > [founditems] > > > > > > > > > [/foundItems] > >
CompanyTitleDescriptionPriceActions
[Company][title][description]$[format .2f][price][/format][cart]&sku=[url][sku][/url]>Add to Cart[cart]&sku=[url][sku][/url]>Detail
> > [shownext] > [cart]&category=[url][category][/url]&startat=[start]>Show Items [start]-[end]
> [/shownext] >
> > [/search] > > [/showif] > > [showif [company]=[company]] > [search db=products.db&eqCompanydata=[url][Company][/url]&asCompanysort=1&max=10&startat=[url][startat][/url]] > >

Your search for [hideif [category]!Strings]'[Category]'[/hideif] [hideif [category]=Strings]'[COMPANY]'[/hideif] found [numFound] items

> >

> Only the first 100 characters of product descriptions are displayed.
> To see a complete product description and a picture (if available) click on the Detail hypertext link.

> >

> > > > > > [founditems] > > > > > > > > > [/foundItems] > >
CompanyTitleDescriptionPriceActions
[Company][title][description]$[format .2f][price][/format][cart]&sku=[url][sku][/url]>Add to Cart[cart]&sku=[url][sku][/url]>Detail
> > [shownext] > [cart]&Company=[url][Company][/url]&startat=[start]>Show Items [start]-[end]
> [/shownext] >
> > [/search] > [/showif] > > [cart]>Show Shopping Cart
> [cart]>Back To Search
> > > > > ------------------------------------------------------------- > 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/ ------------------------------------------------------------- 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/ John Butler

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:

[WebDNA] Code works in v6 but not in v7 (2010) Javascripts (1998) WebCat2 - [format thousands] (1997) Nested tags count question (1997) PROTECT/AUTHORIZE (2002) Share Bulletin Board? (1998) Banner DNA (1997) Credit card processing - UK (1997) Moving files from one server to another... (2001) WC2.0 Memory Requirements (1997) Vanity counter side note (1998) Non expiring cookies again (*sorry*) (1999) FlushDatabases (2000) WebMerchant bomb (1998) Mac GUI editors (1997) [WebDNA] Sorry WebDNA server not running /Template ERROR/ Slow (2019) cart (1997) webstar (ot) (2001) RE: webcat license???? (1997) Help name our technology! (1997)