Re: nested showif?

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 17253
interpreted = N
texte = >>Is there a way to combine [showif] commands? >> >>I have: >>[showif [name]=phone] >> [showif [value]> ] >> ...do something... >> [/showif] >>[/showif| >> >>And I want something which does: >>[showif [name]=phone]-AND-[value]> ] >> ...do something... >>[/showif] > >You're already doing it the right way. If you have lot's of conditions you >could add a simple check function by: > >[Math show=f]EverythingsOK=0[/Math] > >[HideIf [value1]=1][Math show=f]EverythingsOK=EverythingsOK+1[/Math][/HideIf] >[HideIf [value2]=1][Math show=f]EverythingsOK=EverythingsOK+1[/Math][/HideIf] >[HideIf [value3]=1][Math show=f]EverythingsOK=EverythingsOK+1[/Math][/HideIf] > >[ShowIf [Math]EverythingsOK[/Math]0] >Your magic message here >[/ShowIf] This is a great way to get rid of all that nesting, and not only is it faster but it eliminates that Too many nested... error too ... :)Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Associated Messages, from the most recent to the oldest:

    
  1. Re: nested showif? (Kenneth Grome 1998)
  2. Re: nested showif? (christer@ljusaideer.se (Christer Olsson) 1998)
  3. nested showif? (Peter Ostry 1998)
>>Is there a way to combine [showif] commands? >> >>I have: >>[showif [name]=phone] >> [showif [value]> ] >> ...do something... >> [/showif] >>[/showif| >> >>And I want something which does: >>[showif [name]=phone]-AND-[value]> ] >> ...do something... >>[/showif] > >You're already doing it the right way. If you have lot's of conditions you >could add a simple check function by: > >[Math show=f]EverythingsOK=0[/Math] > >[HideIf [value1]=1][Math show=f]EverythingsOK=EverythingsOK+1[/Math][/HideIf] >[HideIf [value2]=1][Math show=f]EverythingsOK=EverythingsOK+1[/Math][/HideIf] >[HideIf [value3]=1][Math show=f]EverythingsOK=EverythingsOK+1[/Math][/HideIf] > >[ShowIf [math]EverythingsOK[/Math]0] >Your magic message here >[/ShowIf] This is a great way to get rid of all that nesting, and not only is it faster but it eliminates that Too many nested... error too ... :)Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Kenneth Grome

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:

search not executing from a post, but works fine with (2004) bug in [SendMail] (1997) re-sorting founditems (2002) The beginning (1997) Question about replacing words (1998) Error: Too many nested [xxx] contexts (1997) Formulas.db (2000) dbQuickView 2.0 (2005) [CART] (1997) Date Bug (1998) Database Not Found Problem (2004) Re1000001: Setting up shop (1997) Initiating NewCart (1997) [subtotal] and others (1997) Can you do this??? and other stuff (1997) How is it done? (1998) WebCat2: Master Counter snippet (1997) authenticating a second user (1997) WebCat2 - Getting to the browser's username/password data (1997) WebCat hosting providers? (1997)