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:

info (1997) Duplicate Cart Problem in Netscape (2000) WebCatb15 Mac CGI -- [purchase] (1997) page redirect in webDNA (1997) [WebDNA] Putting '&search' into URL killing all search contexts on my sites (2010) Database Not Found Problem (2004) Not really WebCat (1997) test (2002) Multiple prices (1997) shipcost (1997) In Digest Dijon (2000) More on the email templates (1997) Calendar (1997) WebCat2: multiple currency support (1997) Any limit to [include] (1997) Bit off subject -- Faxing orders (1997) HELP WITH DATES (1997) [ot] Webserver monitoring (2001) why why why (2004) PCS Frames (1997)