Re: detecting if var is blank?
This WebDNA talk-list message is from 2007
It keeps the original formatting.
numero = 68364
interpreted = N
texte = You could use a function like[function name=isSet][showif [interpret][[v]][/interpret]^[[v]]][return]F[/return][/showif][hideif [interpret][[v]][/interpret]^[[v]]][return]T[/return][/hideif][/function]Then call it by[showif [isSet v=VariableNameOfWhatYouAreChecking]=T]put your stuff in here[/showif]-----Original Message-----From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On Behalf Of AlexMcCombieSent: Thursday, January 25, 2007 10:24 AMTo: WebDNA TalkSubject: Re: detecting if var is blank?[hideif [myvar]=[raw][myvar][/raw]][hideif [myvar]=]Only shows if the variable is not blank or undefined [/hideif][/hideif]You can do this cleaner with an IF statement but figured you might want tostay with hideifs/showifsHTHAlexOn 1/25/07 3:11 PM, "Scott Szretter"
wrote:> I am hoping someone can tell me why this is not working:> > I am trying to show text and a variable only if it is actually preset > and contains something.> Both lines of code below produce this:> > abc:[myvar]> > Here are the two ways I have tried:> > 1.> [showif [myvar]!]abc:[myvar]> [/showif]> > 2.> [showif [myvar]![blank]]abc:[myvar][/showif]> > > Any ideas?> Thanks!--Alex McCombie.. . . . . . . . . . . . . . . . . . . . . . . . . . . .Adventure Skies InteractiveBox 124Martville, NY 131111p. 315 .233 .9403e. Alex@AdventureSkies.comhttp://AdventureSkies.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 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:
You could use a function like[function name=isSet][showif [interpret][[v]][/interpret]^[[v]]][return]F[/return][/showif][hideif [interpret][[v]][/interpret]^[[v]]][return]T[/return][/hideif][/function]Then call it by[showif [isSet v=VariableNameOfWhatYouAreChecking]=T]put your stuff in here[/showif]-----Original Message-----From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On Behalf Of AlexMcCombieSent: Thursday, January 25, 2007 10:24 AMTo: WebDNA TalkSubject: Re: detecting if var is blank?[hideif [myvar]=[raw][myvar][/raw]][hideif [myvar]=]Only shows if the variable is not blank or undefined [/hideif][/hideif]You can do this cleaner with an IF statement but figured you might want tostay with hideifs/showifsHTHAlexOn 1/25/07 3:11 PM, "Scott Szretter" wrote:> I am hoping someone can tell me why this is not working:> > I am trying to show text and a variable only if it is actually preset > and contains something.> Both lines of code below produce this:> > abc:[myvar]> > Here are the two ways I have tried:> > 1.> [showif [myvar]!]abc:[myvar]> [/showif]> > 2.> [showif [myvar]![blank]]abc:[myvar][/showif]> > > Any ideas?> Thanks!--Alex McCombie.. . . . . . . . . . . . . . . . . . . . . . . . . . . .Adventure Skies InteractiveBox 124Martville, NY 131111p. 315 .233 .9403e. Alex@AdventureSkies.comhttp://AdventureSkies.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 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/
"Olin Lagon"
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:
Showing specific [cart] contents (1998)
WebCat and WebTV (1997)
[OT] 'Email this story to a friend' (2003)
[OT] JavaScript Error (2002)
Webcatalog error, Plug-in for Webstar (1996)
authenticate and password (1998)
Updating a database once per day - An example (1998)
This message couldn't reach the list! (1998)
Webstar 1.3.1 PPC (1997)
Re: (1997)
Emailer, SMTP Server, Prefs (2006)
Using WC for Bulk Emailings (1997)
Checking two required fields (1998)
Banner DNA (1997)
WebCat2 Append problem (B14Macacgi) (1997)
Nested tags count question (1997)
Searchable mail archive problems (2003)
RE: New WebCatalog Version !!! (1997)
Can't use old cart file (was One more try) (1997)
WebDNA 6.x - Compatibility with Fedora release 1? (2004)