Re: [defined]ish

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 13520
interpreted = N
texte = >if there's a [name] field, display [name] >if there's an [item] field, display [item] > >To me, this is analogous to check for the variable... However, it >would seem to require a WebDNA tag along the lines of [defined >[name]], and nothing similar seems to exist.If you set a variable fred=12, then using [fred] will display 12. If a variable named fred does not exist, then [fred] will display literally [fred]. This is done purposely so that web pages with text button-bars won't mess up: [ Home | About Us | Guestbook ] should display as plain text even though it has those [ in it.So to check for the 'non-existence' of a variable, you can just check to see if its value is the same as its raw text:[showif [fred]=[raw][fred][/raw]]...variable fred doesn't exist[/showif]Notice you need the [raw] context because [showif [fred]=[fred]] will always be true: [showif 12=12] or [showif [fred]=[fred]] is always true.Grant Hulbert, V.P. Engineering | ===== Tools for WebWarriors ===== Pacific Coast Software | WebCatalog Pro, WebCommerce Solution 11770 Bernardo Plaza Court | SiteEdit Pro, SiteCheck, PhotoMaster San Diego, CA 92128 | SiteGuard 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com Associated Messages, from the most recent to the oldest:

    
  1. Re: [defined]ish (a.h.s. boy 1997)
  2. Re: [defined]ish (Grant Hulbert 1997)
  3. Re: [defined]ish (Christer Olsson 1997)
  4. Re: [defined]ish (a.h.s. boy 1997)
  5. Re: [defined]ish (Kenneth Grome 1997)
  6. Re: [defined]ish (Christer Olsson 1997)
  7. [defined]ish (a.h.s. boy 1997)
>if there's a [name] field, display [name] >if there's an [item] field, display [item] > >To me, this is analogous to check for the variable... However, it >would seem to require a WebDNA tag along the lines of [defined >[name]], and nothing similar seems to exist.If you set a variable fred=12, then using [fred] will display 12. If a variable named fred does not exist, then [fred] will display literally [fred]. This is done purposely so that web pages with text button-bars won't mess up: [ Home | About Us | Guestbook ] should display as plain text even though it has those [ in it.So to check for the 'non-existence' of a variable, you can just check to see if its value is the same as its raw text:[showif [fred]=[raw][fred][/raw]]...variable fred doesn't exist[/showif]Notice you need the [raw] context because [showif [fred]=[fred]] will always be true: [showif 12=12] or [showif [fred]=[fred]] is always true.Grant Hulbert, V.P. Engineering | ===== Tools for WebWarriors ===== Pacific Coast Software | WebCatalog Pro, WebCommerce Solution 11770 Bernardo Plaza Court | SiteEdit Pro, SiteCheck, PhotoMaster San Diego, CA 92128 | SiteGuard 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com Grant Hulbert

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:

multiple front end servers (2004) Grep help (2004) Recalculating Shipping Costs (1997) Calendar Solutions (1998) RE: Upload (1998) [WebDNA] Press Release (2008) [AppendFile] problem (WebCat2b13 Mac .acgi) (1997) calculating tax rates, mail order solutions and version 2 (1997) Serving images from databases (1998) Shell w/ Sandboxes (2004) hm. (2002) SiteEdit Pro Update Announcement (1997) WebCat editing, SiteGuard & SiteEdit (1997) CC and Europe (1999) [WebDNA] Reserved variables (2009) HELP WITH DATES (1997) New servers and new inline cache (1997) New public beta available (1997) WebDNA 5 - Function test weirdness or ? (2003) webCatalog and Stocks (1998)