Re: hideif/showif causes error if wrapped around searches
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 52858
interpreted = N
texte = Yes, it was more of a wishful thinking that the hideif could work like acomment tag and either hide or unhide code. Hmm, just thought, why notuse:[showif [hidesearch]=T][!][/showif][search....][showif [hidesearch]=T][/!][/showif]?Matthew A Perosi wrote:> Well, I'd say from a programming point of view your idea is just a> wrong> use of nested programming code.> Even HTML gets upset with you now-a-days when you incorrectly nest> tags.> Don't get me wrong, I think your idea is rather cool, but I just don't> think any of the programming languages I know would allow> function/procedure/code nesting like what you are looking for.>> End result: rewrite the code OR start using include files more so> your replicated code only shows up 1 time per template; only when> needed.>> Matt Perosi>> Gary Krockover wrote:>>> 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/
Associated Messages, from the most recent to the oldest:
Yes, it was more of a wishful thinking that the hideif could work like acomment tag and either hide or unhide code. Hmm, just thought, why notuse:[showif [hidesearch]=T][!][/showif][search....][showif [hidesearch]=T][/!][/showif]?Matthew A Perosi wrote:> Well, I'd say from a programming point of view your idea is just a> wrong> use of nested programming code.> Even HTML gets upset with you now-a-days when you incorrectly nest> tags.> Don't get me wrong, I think your idea is rather cool, but I just don't> think any of the programming languages I know would allow> function/procedure/code nesting like what you are looking for.>> End result: rewrite the code OR start using include files more so> your replicated code only shows up 1 time per template; only when> needed.>> Matt Perosi>> Gary Krockover wrote:>>> 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/
"Gary Krockover"
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:
quantity minimum problem (1997)
Hiding Brands (2004)
iTools5.0014 and up + WebCat = DownServer (2000)
Multiple Pulldowns (1997)
Plugin or CGI or both (1997)
WC2b12: Yes, Formulas.db is for real (1997)
[WebDNA] How to code a 301 redirect (2008)
no [search] with NT (1997)
Execute Applescript (1997)
Locking up with WebCatalog... (1997)
Long/Lat (2002)
Automated FTP from Shell (2004)
[WebDNA] DigitalOcean Snapshots (2019)
Multiple cart additions (1997)
WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997)
Searching multiple Databases (1997)
[WebDNA] [BULK] XML/RSS/TCP Connect etc... (2011)
Calendar Program (2004)
FWD: Autoproxy Bug with WebCatalog and FireSite (1997)
WC2.0 Memory Requirements (1997)