Re: hideif/showif causes error if wrapped around searches
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 52874
interpreted = N
texte = WebDNA is basically an recursive 'inside-out' contextual parser. When atoken is determined to be the beginning of a WebDNA context, the parsercollects the inner content, up to the closing tag, and parses that beforecompleting the executing the 'containing' context function.So, in your example code, WebDNA encounters the [hideif] context, and in thecase when [hidesearch] is not 'T', the engine collects the inner contentbetween the [hideif] tokens and attempts to parse it. But this failsbecause:"[search db=...][founditems]"is incomplete, missing both the [/founditems] and [/search].It's best to keep in mind that WebDNA code, existing between a context pair,needs to be syntactically complete.-----Original Message-----From: Gary Krockover [mailto:gary@garykrockover.com]Sent: Friday, September 12, 2003 9:20 PMTo: WebDNA-Talk@talk.smithmicro.comSubject: hideif/showif causes error if wrapped around searchesI know I'll never find this answer in the archives and I don't recall iteven 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 tagshideif/showifand /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 maketwopages with different searches on each. So a form post, with the searchanda hidden field of hidesearch=T. The page is the home page, so when itisfirst hit I want the search performed automatically and sorted one way,usercan click a button to sort it the other way, hiding the original searchandusing 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 toWeb 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:
WebDNA is basically an recursive 'inside-out' contextual parser. When atoken is determined to be the beginning of a WebDNA context, the parsercollects the inner content, up to the closing tag, and parses that beforecompleting the executing the 'containing' context function.So, in your example code, WebDNA encounters the [hideif] context, and in thecase when [hidesearch] is not 'T', the engine collects the inner contentbetween the [hideif] tokens and attempts to parse it. But this failsbecause:"[search db=...][founditems]"is incomplete, missing both the [/founditems] and [/search].It's best to keep in mind that WebDNA code, existing between a context pair,needs to be syntactically complete.-----Original Message-----From: Gary Krockover [mailto:gary@garykrockover.com]Sent: Friday, September 12, 2003 9:20 PMTo: WebDNA-Talk@talk.smithmicro.comSubject: hideif/showif causes error if wrapped around searchesI know I'll never find this answer in the archives and I don't recall iteven 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 tagshideif/showifand /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 maketwopages with different searches on each. So a form post, with the searchanda hidden field of hidesearch=T. The page is the home page, so when itisfirst hit I want the search performed automatically and sorted one way,usercan click a button to sort it the other way, hiding the original searchandusing 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 toWeb 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/
"Scott Anderson"
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:
WebCat2b12 CGI Mac - [shownext] problem (1997)
taxTotal (1997)
W* 4.2 / WebCat (TPro) 3.0.5b / OS 8.5.1 / BW G3 (2000)
[append] and SSL (1997)
Storebuilder (2000)
Weird Problem (1997)
Major NT problem Interruption of service (1998)
[lineitems] and [writefile] (1998)
[OT] Mime Headers / Meta-Tags (2003)
Documentation Feedback (1997)
REDIRECT MULTIPLE RESULTS (2000)
Writing custom WebCat searches?? (2000)
WebCatalog for Postcards ? (1997)
Further tests with the infamous shipCost (1997)
Permissions with 3.06 Linux (2000)
File Upload, Browser Timeout (2003)
PCS Frames (1997)
Here we go again... (2006)
Bug - 4.5 (2002)
Make sure I understand this??? (1997)