2 Replies Latest reply on Apr 21, 2008 10:22 AM by (Steve_Doney)

    Any idea why this javascript always brings the console up?

      I'm not a great java expert but for some reason the code below always brings the console up before it executes correctly.

      Any help or suggestions would be appreciated.

      Thanks

      Steve

      // Set Doc Info
      // Save existing settings
      var temp = this.info.title;
      //Show dialog box
      var cRtn = app.response("Current Doc Summary is: \"" + temp + "\"");
      //Check for empty response
      if ((cRtn == null) || (cRtn == ""))
      {
      this.info.title = temp;
      }
      else
      {
      this.info.title = cRtn;
      }
      //Set author
      this.info.author = "Steve";
      //Set Subject if empty
      if (this.info.subject == "")
      {
      this.info.subject = "Steve Subject"
      }
        • 1. Re: Any idea why this javascript always brings the console up?
          Patrick Leckey Level 3
          I just copied and pasted your code into a button on a blank form and it executed properly without opening the console.

          Make sure any console windows you have open on other documents are closed. The console window is global - if you have 2 documents open in Acrobat and open the console on 1, then switch to the other and perform an action, the console will then appear in that window due to its "always on top" setting.
          • 2. Re: Any idea why this javascript always brings the console up?
            Level 1
            I just did the same test and pasted the code into a button on a blank form and it executed properly without opening the console too!!

            Why it feels the need to open the console when run from a batch sequence beats me, thought it might have been one of the settings to display errors etc but even when they are all de-activated up pops the console each time.

            A simple one liner does not open the console so I thought maybe it was a code error that I was missing.

            Doh!