4 Replies Latest reply on Oct 23, 2013 3:57 AM by Laubender

    Newbie question - probelm with if statement

    myDavey Level 1


      I am pretty new to Javascript and InDesign

      I wrote something which seemed to be simple but its not working

      I want to condition that of the row is not a Header row and not a footer row then.... else ....



      if (myRowType != "HEADER_ROW" && myRowType != "FOOTER_ROW") {


      } else {

          alert("NOT BODY");



      Why is it that even when the first alert (before the condition) comes out  "HEADER_ROW"

      the second alert still shows "BODY"???


      (I know I can write if myRowType == "BODY_ROW", but there is a reason why I prefer not to - Although thats not working either)




      If someone can help me with this I would really appreciate it


      Thanks in advance!