10 Replies Latest reply on Jan 22, 2018 4:15 AM by subieguy2

    Illegal Character 1 Error

    subieguy2 Level 1

      I am running Acrobat Pro XI on a Windows 7 computer. I have placed the following code on a button so when the user clicks it the layer

      "L730-A26" will turn off.


      var colorLayer = "L730-A26";
      var ocgSchematicArray = this.getOCGs(this.pageNum);
      for (var i=0; i < ocgSchematicArray.length; i++){
          if (ocgSchematicArray[i].name == colorLayer){
              ocgSchematicArray[i].state = false;


      I am getting this message:



      I have run this exact code in the exact same way on another file without issue. I have deleted all the code and typed it all out (no copy and paste) to eliminate the possibility of odd characters from pasting.


      Still no success. Can someone please tell me what I am doing wrong?