Re: hideif/showif causes error if wrapped around searches

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 52890
interpreted = N
texte = If there is no search than the area within the founditems would not display. add a [showif [numfound]=0] the no search option. feed it --edIDdatarq=some_ridiculous_id_value and the results will reutrn numfound=0. If you need a numfound=0 for the real search add in the showif some error checking [showif [numfound]=0] [showif [--eqIDdatarq]=some_ridiculous_id_value] This is the no search area [/showif] [showif [--eqIDdatarq]!some_ridiculous_id_value] Your search returned 0 results. [/showif] [/showif] ----- Original Message ----- From: "Chris List Recipient" To: "WebDNA Talk" Sent: Monday, September 15, 2003 10:00 AM Subject: Re: hideif/showif causes error if wrapped around searches > But isn't his original problem that he sometimes wants a search and > sometimes doesn't? Your answer allows for different search critera but does > not accommodate having *no* search. > > -Chris > > -----Original Message----- > From: WebDna @ [mailto:webdna@inkblotmedia.com] > Sent: Monday, September 15, 2003 10:07 AM > To: WebDNA-Talk@talk.smithmicro.com > Subject: Re: hideif/showif causes error if wrapped around searches > > > This does not solve having to maintain multiple search context and will have > repetative code. > > That is why in my example I used a formvariables loop to feed it search > criteria and a showif/hideif style to show the sort features. By adding the > sortdir and sorttype to th shownext links you will not lose your sort. > > Alternately you could use the variable approach to search > > [text]string=search criteria[/text] > > [search [string]] > > This would allow you to pass any value you want to the search including > Database. This in conjuntion with either a cookie or the cart can allow you > to remember searchs and what page they were on etc. > > > ----- Original Message ----- > From: "Chris List Recipient" > To: "WebDNA Talk" > Sent: Monday, September 15, 2003 9:41 AM > Subject: Re: hideif/showif causes error if wrapped around searches > > > > Gary, > > > > I vote using an INCLUDE... > > > > [showif [hidesearch]=T] > > [include something_else_filename] > > [/showif] > > [hideif [hidesearch]=T] (and it does) > > [search db=...] > > [founditems] > > [include something_else_filename] > > [/founditems] > > [/search] > > [/hideif] > > > > -Chris > > > > -----Original Message----- > > From: Gary Krockover [mailto:gary@garykrockover.com] > > Sent: Friday, September 12, 2003 9:20 PM > > To: WebDNA-Talk@talk.smithmicro.com > > Subject: hideif/showif causes error if wrapped around searches > > > > > > I know I'll never find this answer in the archives and I don't recall > > it even coming up before but I'm sure others have noticed this > > behavior. > > > > If you wrap a hideif or a showif around a [search] and it's closing > > [/search], you'll get an error about the nesting of the tags > > hideif/showif and /search. Por que? > > > > Example: > > > > [hideif [hidesearch]=T] (and it does) > > [search db=...] > > [founditems] > > [/hideif] > > Something else > > [hideif [hidesearch]=T] > > [/founditems] > > [/search] > > [/hideif] > > > > What am I trying to do? Add a sort for a page without having to make > > two pages with different searches on each. So a form post, with the > > search > and > > a hidden field of hidesearch=T. The page is the home page, so when it > > is first hit I want the search performed automatically and sorted one > > way, > user > > can click a button to sort it the other way, hiding the original > > search > and > > using the one in the form. > > > > What's the preferred method here? > > > > Thanks, > > GK > > > > > > ------------------------------------------------------------- > > 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://webdna.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://webdna.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://webdna.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://webdna.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://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: hideif/showif causes error if wrapped around searches ( "WebDna @" 2003)
  2. Re: hideif/showif causes error if wrapped around searches ( Chris List Recipient 2003)
  3. Re: hideif/showif causes error if wrapped around searches ( "WebDna @" 2003)
  4. Re: hideif/showif causes error if wrapped around searches ( Chris List Recipient 2003)
  5. Re: hideif/showif causes error if wrapped around searches ( "Scott Anderson" 2003)
  6. Re: hideif/showif causes error if wrapped around searches ( Terry Wilson 2003)
  7. Re: hideif/showif causes error if wrapped around searches ( "Gary Krockover" 2003)
  8. Re: hideif/showif causes error if wrapped around searches ( Matthew A Perosi 2003)
  9. Re: hideif/showif causes error if wrapped around searches ( "Gary Krockover" 2003)
  10. Re: hideif/showif causes error if wrapped around searches ( "WebDna @" 2003)
  11. Re: hideif/showif causes error if wrapped around searches ( "Gary Krockover" 2003)
  12. Re: hideif/showif causes error if wrapped around searches ( "WebDna @" 2003)
  13. Re: hideif/showif causes error if wrapped around searches ( "Dan Strong" 2003)
  14. Re: hideif/showif causes error if wrapped around searches ( "Dan Strong" 2003)
  15. Re: hideif/showif causes error if wrapped around searches ( "WebDna @" 2003)
  16. Re: hideif/showif causes error if wrapped around searches ( "Gary Krockover" 2003)
  17. Re: hideif/showif causes error if wrapped around searches ( Terry Wilson 2003)
  18. hideif/showif causes error if wrapped around searches ( "Gary Krockover" 2003)
If there is no search than the area within the founditems would not display. add a [showif [numfound]=0] the no search option. feed it --edIDdatarq=some_ridiculous_id_value and the results will reutrn numfound=0. If you need a numfound=0 for the real search add in the showif some error checking [showif [numfound]=0] [showif [--eqIDdatarq]=some_ridiculous_id_value] This is the no search area [/showif] [showif [--eqIDdatarq]!some_ridiculous_id_value] Your search returned 0 results. [/showif] [/showif] ----- Original Message ----- From: "Chris List Recipient" To: "WebDNA Talk" Sent: Monday, September 15, 2003 10:00 AM Subject: Re: hideif/showif causes error if wrapped around searches > But isn't his original problem that he sometimes wants a search and > sometimes doesn't? Your answer allows for different search critera but does > not accommodate having *no* search. > > -Chris > > -----Original Message----- > From: WebDna @ [mailto:webdna@inkblotmedia.com] > Sent: Monday, September 15, 2003 10:07 AM > To: WebDNA-Talk@talk.smithmicro.com > Subject: Re: hideif/showif causes error if wrapped around searches > > > This does not solve having to maintain multiple search context and will have > repetative code. > > That is why in my example I used a formvariables loop to feed it search > criteria and a showif/hideif style to show the sort features. By adding the > sortdir and sorttype to th shownext links you will not lose your sort. > > Alternately you could use the variable approach to search > > [text]string=search criteria[/text] > > [search [string]] > > This would allow you to pass any value you want to the search including > Database. This in conjuntion with either a cookie or the cart can allow you > to remember searchs and what page they were on etc. > > > ----- Original Message ----- > From: "Chris List Recipient" > To: "WebDNA Talk" > Sent: Monday, September 15, 2003 9:41 AM > Subject: Re: hideif/showif causes error if wrapped around searches > > > > Gary, > > > > I vote using an INCLUDE... > > > > [showif [hidesearch]=T] > > [include something_else_filename] > > [/showif] > > [hideif [hidesearch]=T] (and it does) > > [search db=...] > > [founditems] > > [include something_else_filename] > > [/founditems] > > [/search] > > [/hideif] > > > > -Chris > > > > -----Original Message----- > > From: Gary Krockover [mailto:gary@garykrockover.com] > > Sent: Friday, September 12, 2003 9:20 PM > > To: WebDNA-Talk@talk.smithmicro.com > > Subject: hideif/showif causes error if wrapped around searches > > > > > > I know I'll never find this answer in the archives and I don't recall > > it even coming up before but I'm sure others have noticed this > > behavior. > > > > If you wrap a hideif or a showif around a [search] and it's closing > > [/search], you'll get an error about the nesting of the tags > > hideif/showif and /search. Por que? > > > > Example: > > > > [hideif [hidesearch]=T] (and it does) > > [search db=...] > > [founditems] > > [/hideif] > > Something else > > [hideif [hidesearch]=T] > > [/founditems] > > [/search] > > [/hideif] > > > > What am I trying to do? Add a sort for a page without having to make > > two pages with different searches on each. So a form post, with the > > search > and > > a hidden field of hidesearch=T. The page is the home page, so when it > > is first hit I want the search performed automatically and sorted one > > way, > user > > can click a button to sort it the other way, hiding the original > > search > and > > using the one in the form. > > > > What's the preferred method here? > > > > Thanks, > > GK > > > > > > ------------------------------------------------------------- > > 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://webdna.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://webdna.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://webdna.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://webdna.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://webdna.smithmicro.com/ "WebDna @"

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:

Setting up WebCatalog with Retail Pro data (1996) Cookie still not working (1999) Webcat Memory use??? (2004) OK, here goes... (1997) Protect vs Authenicate (1997) Still having install problems (2000) Sku numbers (1997) grep question - how to strip spaces from the beginning ofa string? (2002) AOL and [referrer] (2001) Search design (1997) what's wrong with this picture (2006) [WebDNA] WebDNA with Solr (2011) Help! WebCat2 bug (1997) Why do extra quotation marks sometimes appear in my databases? (1998) Append again (1999) pop up menu's (1998) Showif for mulitple variations (1997) Calendar (1997) [OT] Linux Mailservers (2003) HELP WITH DATES (1997)