Re: useful guidelines =] vs !]

This WebDNA talk-list message is from

2007


It keeps the original formatting.
numero = 68784
interpreted = N
texte = Matthew is right, you must [URL] the variable otherwise this will fail: var=all done! [Showif [var]=]variable was empty[/ShowIf] This will work properly: [Showif [URL][var][/URL]=]variable was empty[/ShowIf] On 11 Apr 2007, at 12:51 AM, Matthew A Perosi wrote: > Ah yes, this might be true. But if you follow one of the previous > guidelines to [url] wrap all variables you will never have any > trouble with the !=~ as described below. > > I always found it conceptually easier to use > [showif [url][var][/url]=] > [showif [url][var][/url]!] > because putting the qualifier before the variable is backward > thinking for us humans. > > So try it for yourself and understand it more easily ;-) > > Matthew Perosi > > -- > Matthew A Perosi > Psi Prime, Inc. > http://www.psiprime.com > 323 Union Blvd. > Totowa, NJ 07512 > P: 973.225.9870 > F: 973.413.8217 > > > > > Bob Minor wrote: > > One thing you probably want to do instead, > > [showif = [var]]something[/showif] > [showif ![var]]something[/showif] > > in case your variable contains a !=~ etc. this could throw off > your results as webdna reads this first qualifying statement, > hence if var value was set to "!" > > then you statement would be [showif !=] or in plain english, show > if "" does not equal "=" which of course it doesn't. This leaves > you with opposite of what you wanted which is showif "" equals "!". > > try it for yourself and enjoy! > > > > > On Apr 10, 2007, at 9:03:18:0, sbraun wrote: > >> As long as we're listing some useful guidelines, >> I always get these 2 mixed up, and have to test it out by trial >> and error, ie. lots of my time. >> >> What's the layman's difference/explanation of the following 2 >> statements? >> >> [showif [var]=]something[/showif] >> [showif [var]!]something[/showif] >> >> Thanks, >> sfb >> >> >> >> On Apr 10, 2007, at 7:29 AM, Terry Wilson wrote: >> >>> I would add to Donovan's excellent guidelines this: >>> >>> [input][/input] when the value is in a form input of any kind, >>> and make sure you use the quotes. e.g.: >>> >> >> > > > > > > > ------------------------------------------------------------- > 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 digest@talk.smithmicro.com> > 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: useful guidelines =] vs !] ( Stuart Tremain 2007)
  2. Re: useful guidelines =] vs !] ( Matthew A Perosi 2007)
  3. Re: useful guidelines =] vs !] ( Matthew A Perosi 2007)
  4. Re: useful guidelines =] vs !] ( Bob Minor 2007)
  5. Re: useful guidelines =] vs !] ( Donovan Brooke 2007)
  6. useful guidelines =] vs !] ( sbraun 2007)
Matthew is right, you must [url] the variable otherwise this will fail: var=all done! [Showif [var]=]variable was empty[/ShowIf] This will work properly: [Showif [url][var][/URL]=]variable was empty[/ShowIf] On 11 Apr 2007, at 12:51 AM, Matthew A Perosi wrote: > Ah yes, this might be true. But if you follow one of the previous > guidelines to [url] wrap all variables you will never have any > trouble with the !=~ as described below. > > I always found it conceptually easier to use > [showif [url][var][/url]=] > [showif [url][var][/url]!] > because putting the qualifier before the variable is backward > thinking for us humans. > > So try it for yourself and understand it more easily ;-) > > Matthew Perosi > > -- > Matthew A Perosi > Psi Prime, Inc. > http://www.psiprime.com > 323 Union Blvd. > Totowa, NJ 07512 > P: 973.225.9870 > F: 973.413.8217 > > > > > Bob Minor wrote: > > One thing you probably want to do instead, > > [showif = [var]]something[/showif] > [showif ![var]]something[/showif] > > in case your variable contains a !=~ etc. this could throw off > your results as webdna reads this first qualifying statement, > hence if var value was set to "!" > > then you statement would be [showif !=] or in plain english, show > if "" does not equal "=" which of course it doesn't. This leaves > you with opposite of what you wanted which is showif "" equals "!". > > try it for yourself and enjoy! > > > > > On Apr 10, 2007, at 9:03:18:0, sbraun wrote: > >> As long as we're listing some useful guidelines, >> I always get these 2 mixed up, and have to test it out by trial >> and error, ie. lots of my time. >> >> What's the layman's difference/explanation of the following 2 >> statements? >> >> [showif [var]=]something[/showif] >> [showif [var]!]something[/showif] >> >> Thanks, >> sfb >> >> >> >> On Apr 10, 2007, at 7:29 AM, Terry Wilson wrote: >> >>> I would add to Donovan's excellent guidelines this: >>> >>> [input][/input] when the value is in a form input of any kind, >>> and make sure you use the quotes. e.g.: >>> [input] >>> [myUSERNAMEvar] [/input]"> >> >> > > > > > > > ------------------------------------------------------------- > 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 digest@talk.smithmicro.com> > 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/ Stuart Tremain

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:

How To question on setting up downloads (1997) Multi-processor Mac info ... (1997) Questions To Answer (1997) empty shopping cart message (1997) HomePage Caution (1997) SSL/Document Contains NO Data (1998) Emailer Set Up (1997) What is WebDNA (1997) [WebDNA] Ubuntu 14.04 & WebDNA 8.2 (html not rendering) (2017) Emailer (1999) I've been thinking (2002) Sample Tearoom Search Error - Solved! (1997) First postarg not taking in $Commands (1997) Multiple Newcarts (1996) READFILE command? (1998) WebCat for Unix?? (1997) Quit revisited (1997) WebCatalog not recognizing ShoppingCarts folder (2000) textarea inputs and returns (1999) SEA files (1996)