Re: [defined]ish

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 13519
interpreted = N
texte = >(Goofy examples are born of simplifications.) However, it's possible >that some clever devil might skip the logon page, and simply hit >news.tmpl, which would leave the [name] variable undefined. Or >rather, WebCatalog wouldn't consider [name] to be a variable at all, >despite the brackets. > >I'd like to be able to trap for such an error, rather than leaving >[name] in raw text. However, since [name] could be _any_ name, I >simply cannot do a [showif] context for an infinite number of possible >names. So I'd like to be able to say > > [showif [name]=] > Welcome, stranger! Why don't you hit logon.tmpl and give me your name? > [/showif]Use the [REFERRER] tag instead:[SHOWIF [REFERRER]^yourdomain.com/path/logon.tmpl] Your friendly text here [/SHOWIF][HIDEIF [REFERRER]^yourdomain.com/path/logon.tmpl] Your nasty text here. [/HIDEIF]Use the domain portion of your URL too in the referren, otherwise the evil one can link from any document named logon.tmpl....and you don't have to pass the variables in the URTL if you're using a form. So you can have an action with just news.tmpl. ************************************************************* Christer Olsson Stora Nygatan 21 Phone +46 40 791 50 Art director S-211 37 Malmoe Fax +46 40 97 99 77 Ljusa Ideer AB Sweden http://www.ljusaideer.se 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)
>(Goofy examples are born of simplifications.) However, it's possible >that some clever devil might skip the logon page, and simply hit >news.tmpl, which would leave the [name] variable undefined. Or >rather, WebCatalog wouldn't consider [name] to be a variable at all, >despite the brackets. > >I'd like to be able to trap for such an error, rather than leaving >[name] in raw text. However, since [name] could be _any_ name, I >simply cannot do a [showif] context for an infinite number of possible >names. So I'd like to be able to say > > [showif [name]=] > Welcome, stranger! Why don't you hit logon.tmpl and give me your name? > [/showif]Use the [referrer] tag instead:[SHOWIF [referrer]^yourdomain.com/path/logon.tmpl] Your friendly text here [/SHOWIF][HIDEIF [referrer]^yourdomain.com/path/logon.tmpl] Your nasty text here. [/HIDEIF]Use the domain portion of your URL too in the referren, otherwise the evil one can link from any document named logon.tmpl....and you don't have to pass the variables in the URTL if you're using a form. So you can have an action with just news.tmpl. ************************************************************* Christer Olsson Stora Nygatan 21 Phone +46 40 791 50 Art director S-211 37 Malmoe Fax +46 40 97 99 77 Ljusa Ideer AB Sweden http://www.ljusaideer.se Christer Olsson

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:

template not found error (1998) Protect (1997) forming a SKU (1999) General Purpose Database utility ????? (2003) [AppendFile] problem (WebCat2b13 Mac .acgi) (1997) WebCat cannot handle compatible search parameters? (1997) Variable prices and Formulas.db (1997) Serving .wml pages to WAP via webcat (2000) Problem with summary on date / inconsequent webcat behaviour (1998) Closing Databases (1998) [isfile] ? (1997) popups, netscape vs explorer (1997) Multiple catalog databases and showcart (1997) AppleScript Error (2001) WebCatalog for guestbook ? (1997) TinyStore example templates (1998) WebCat NT v. Mac (1997) WebCatalog NT beta 18 now available (1997) Re:Emailer and encryption (1997) [Sum] function? (1997)