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:

Autoreturn Submit? (1997) [MATH] and Dates (1998) Location of Browser Info.txt file (1997) Okay, I give up... (1999) Checkboxes (1998) WebCatalog 2.1b3 - Plugin or cgi ? (1997) OT: Variables in printed URL (2007) Where's Cart Created ? (1997) [OT] Flash & WebDNA (2003) Smith Micro - no competition (2000) database visibility (2000) database size? (1997) Running 2 two WebCatalog.acgi's (1996) UPDATE PROBLEM (1997) Bug Report, maybe (1997) WebCat2b15MacPlugin - showing [math] (1997) [WebDNA] Talklist Archive & Twitter (2009) OT: Making demo movies (2002) [ShowIf] if the varieable exists (1998) WebCatalog for Postcards ? (1997)