Re: [WebDNA] showif with empty variable
This WebDNA talk-list message is from 2015
It keeps the original formatting.
numero = 112174
interpreted = N
texte = > I am having an 'age-old' problem with webDNA.> I want to use a showif tag with an empty variable.If you initialize all your variables at the top of the page (forexample, as insecure text variables with blank values) you willnever have this problem again. Here's why:This is the hierarchy of variables in every WebDNA page:secure text variablesincoming formvariablesinsecure text variablesIncoming formvariables override insecure text variables, andsecure text variables override incoming formvariables. So if youinitialize all your variables as insecure text variables at thetop of the page like this:[text secure=f]selector=[/text]... your [selector] tags in the same page will always have values. Either they will still have their initialized "blank" values, orthose initial values will have been overridden by your incomingformvariable values (or by the setting of secure text variables ofcourse).This means you'll never have to mess with this [raw] code trick:[showif [url][selector][/url]=[raw][selector][/raw]]... because its only purpose is to deal with UNinitializedvariables, but yours were initialized at the top of the page!:)So now you can use this simpler and more elegant code when doingall your comparisons, and it will always work as expected:[showif [url][selector][/url]=]Regards,Kenneth GromeWebDNA Solutionshttp://www.webdnasolutions.comWeb Database Systems and Linux Server ManagementOn 03/13/2015 05:59 PM, Steve Braun wrote:> Hi All,> I am having an 'age-old' problem with webDNA.> I want to use a showif tag with an empty variable.> I've read some of the archives, but they don't seem to apply.> > This works:> [showif [selector]=home] [include home_page.inc] [/showif] > [showif [selector]=local] [include local_page.inc] [/showif] > > How do I make this work?> [showif [selector]=] [include blank_page.inc] [/showif] > > Thanks for any assistance.> > Stephen F Braun> sbraun1@twcny.rr.com
> --------------------------------------------------------- This> message is sent to you because you are subscribed to the mailing> list . To unsubscribe, E-mail to: archives:> http://mail.webdna.us/list/talk@webdna.us Bug Reporting:> support@webdna.us
Associated Messages, from the most recent to the oldest:
> I am having an 'age-old' problem with webDNA.> I want to use a showif tag with an empty variable.If you initialize all your variables at the top of the page (forexample, as insecure text variables with blank values) you willnever have this problem again. Here's why:This is the hierarchy of variables in every WebDNA page:secure text variablesincoming formvariablesinsecure text variablesIncoming formvariables override insecure text variables, andsecure text variables override incoming formvariables. So if youinitialize all your variables as insecure text variables at thetop of the page like this:[text secure=f]selector=[/text]... your [selector] tags in the same page will always have values. Either they will still have their initialized "blank" values, orthose initial values will have been overridden by your incomingformvariable values (or by the setting of secure text variables ofcourse).This means you'll never have to mess with this [raw] code trick:[showif [url][selector][/url]=[raw][selector][/raw]]... because its only purpose is to deal with UNinitializedvariables, but yours were initialized at the top of the page!:)So now you can use this simpler and more elegant code when doingall your comparisons, and it will always work as expected:[showif [url][selector][/url]=]Regards,Kenneth GromeWebDNA Solutionshttp://www.webdnasolutions.comWeb Database Systems and Linux Server ManagementOn 03/13/2015 05:59 PM, Steve Braun wrote:> Hi All,> I am having an 'age-old' problem with webDNA.> I want to use a showif tag with an empty variable.> I've read some of the archives, but they don't seem to apply.> > This works:> [showif [selector]=home] [include home_page.inc] [/showif] > [showif [selector]=local] [include local_page.inc] [/showif] > > How do I make this work?> [showif [selector]=] [include blank_page.inc] [/showif] > > Thanks for any assistance.> > Stephen F Braun> sbraun1@twcny.rr.com > --------------------------------------------------------- This> message is sent to you because you are subscribed to the mailing> list . To unsubscribe, E-mail to: archives:> http://mail.webdna.us/list/talk@webdna.us Bug Reporting:> support@webdna.us
Kenneth Grome
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:
PROBLEM (1997)
Pulldown Menu Problem (2000)
[WebDNA] Search Question (2009)
[WriteFile] problems (1997)
Deleting Multiple Database Records based on Checkbox (1998)
user/password validation (1998)
[taxrate] question (1997)
IE 6 form caching issue. (2003)
no template caching (1997)
Secure server question (1997)
[WebDNA] Calendar Edit (2010)
upgrading (1997)
[WebDNA] Searching using variable or numeric number (2019)
Download URL & access on the fly ? (1997)
WebCatalog can't find database (1997)
ShoppingCart Woes (1998)
Online reference (1997)
posts (1998)
nude virgin confusion?? (2004)
Possible Bug in 2.0b15.acgi (1997)