Re: [showif] problem

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 22934
interpreted = N
texte = Howard, this is from the online docs:Tip: make sure neither side of the comparison equation contains any of the special comparison letters listed above. For example, [ShowIf I'm Friendly! Are you?=[question]] contains an exclamation point inside the sentence being compared, so WebCatalog sees this as I'm Friendly is not equal to Are you?=[question], which is not what the author meant to compare.The solution is to wrap each side of the comparison with [URL] contexts, like this: [ShowIf [URL]I'm Friendly! Are you?[/URL]=[URL][question][/URL]]. This causes any embedded !=>< symbols to be converted to their URL equivalents, which can then be compared correctly. Howard Wolosky wrote:> Here's the problem: > > I have a showif statement with the following: > [showif [_body]=] > [math show=f]ERROR=1[/math] > [/showif] > > this comes from a page with a text input of > > > Now, I just want to set the error if the body is blank. However, if > someone enters an exclamation point (!) (or probably any other comparsion > operator) it sets error to 1. > > I'm figuring that webcat is substituting the text into the showif statement > first, then it looks at the comaprsion statement, > e.g. if _body=Wow!This is cool > then the showif statement after replacing [_body] would read > [showif Wow!This is cool=] > ..... > [/showif] > and since Wow does not equal This is cool= it sets error to be 1. > > I don't want this to happen. Anyone have a similar problem or a solution > for it? > > Any help would be appreciated. > > Howard Wolosky > ============ > > Lead Programmer / Webmaster > www.willitwork.com > Will It Work presented by Lab 2K > -The World's Largest Year 2000 > Compliance Search Engine -- Gil Poulsen, Webmaster************************************************************** * AltiM@c * Phone: (908) 222-9001 * * 111 Mali Drive * FAX: (908) 222-9002 * * North Plainfield, NJ * e-mail: help@altimac.com * * 07062-2355 * WWW: http://www.altimac.com * ************************************************************** Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] [showif] problem (Gil Poulsen 2009)
  2. [WebDNA] [showif] problem (Lawrence 2009)
  3. Re: [SHOWIF] PROBLEM (WebDNA Support 2000)
  4. [SHOWIF] PROBLEM (Natalie M. Rezonoff 2000)
  5. Re: [SHOWIF] PROBLEM (Nitai 2000)
  6. Re: [showif] problem (Kenneth Grome 1999)
  7. Re: [showif] problem (Gil Poulsen 1999)
  8. [showif] problem (Howard Wolosky 1999)
Howard, this is from the online docs:Tip: make sure neither side of the comparison equation contains any of the special comparison letters listed above. For example, [ShowIf I'm Friendly! Are you?=[question]] contains an exclamation point inside the sentence being compared, so WebCatalog sees this as I'm Friendly is not equal to Are you?=[question], which is not what the author meant to compare.The solution is to wrap each side of the comparison with [url] contexts, like this: [ShowIf [url]I'm Friendly! Are you?[/URL]=[url][question][/URL]]. This causes any embedded !=>< symbols to be converted to their URL equivalents, which can then be compared correctly. Howard Wolosky wrote:> Here's the problem: > > I have a showif statement with the following: > [showif [_body]=] > [math show=f]ERROR=1[/math] > [/showif] > > this comes from a page with a text input of > > > Now, I just want to set the error if the body is blank. However, if > someone enters an exclamation point (!) (or probably any other comparsion > operator) it sets error to 1. > > I'm figuring that webcat is substituting the text into the showif statement > first, then it looks at the comaprsion statement, > e.g. if _body=Wow!This is cool > then the showif statement after replacing [_body] would read > [showif Wow!This is cool=] > ..... > [/showif] > and since Wow does not equal This is cool= it sets error to be 1. > > I don't want this to happen. Anyone have a similar problem or a solution > for it? > > Any help would be appreciated. > > Howard Wolosky > ============ > > Lead Programmer / Webmaster > www.willitwork.com > Will It Work presented by Lab 2K > -The World's Largest Year 2000 > Compliance Search Engine -- Gil Poulsen, Webmaster************************************************************** * AltiM@c * Phone: (908) 222-9001 * * 111 Mali Drive * FAX: (908) 222-9002 * * North Plainfield, NJ * e-mail: help@altimac.com * * 07062-2355 * WWW: http://www.altimac.com * ************************************************************** Gil Poulsen

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:

$append (1998) multi-paragraph fields (1997) CVS Files for databases (2000) Shipping [grandtotal] solution (1997) Where's Cart Created ? (1997) New command suggestion (1997) Claris HomePage messes up the code (1997) WebDNA 4.5 & iTools 7 (2003) WebStar Secure on other machine (1997) Cookies (1999) Configuring E-mail (1997) File Upload (2000) WebCat2.0 acgi vs plugin (1997) using showpage and showcart commands (1996) searchable list archive (1997) OSX 4.5 webstar (2002) For those of you not on the WebCatalog Beta... (1997) NT [delete] (1998) [WebDNA] Friday's.. WIP thread (2009) Version 6 Problems (2004)