2 Replies Latest reply on Jul 13, 2006 10:25 AM by c1natra


      Everyone -

      I know this is easy, but I don't know CFScript. I want to add the equivilent to CFELSEIF to the following, allowing me a third option for my nav.

      if (listlast(cgi.SCRIPT_NAME,"/") eq "merchantsolutions.cfm") {
      link1 = "<a href=""URLHere"" title=""Developing What You Need"" target=""_blank"">Site Design</a>";
      link1 = "<a href=""URLHere"" title=""Products You Need"" target=""_blank"">Web Products</a>";

      How do I add a 3rd option to this?

        • 1. CFSCRIPT
          I've gone over this recently, and help can be found in the following resource:


          It includes the following information:

          CFScript does not include an elseif statement. However, you can use an if statement immediately after an else statement to create the equivalent of a cfelseif tag, as the following example shows:

          if(score GT 1)
          result = "positive";
          else if(score EQ 0)
          result = "zero";
          result = "negative";

          Hope that helps.
          • 2. Re: CFSCRIPT
            c1natra Level 1
            Thanks. I knew it would be easy, just coudn't find the syntax. Cheers, that's a great help DevGuy.