3 Replies Latest reply on Jun 7, 2011 8:10 AM by George_Johnson

    javascript works fine in console but not in button

    Techi Panda Level 2

      Hi experts

       

      the below save as script works fine while i manually enter in the console and press enter, While I created a button and set action to Run A Javascript its not working

       

      var full_path = this.path;

      var this_name = this.documentFileName;

      var file_path = full_path.split(this_name)[0];

      var new_file = file_path + 'new.pdf';

      app.alert(new_file);

      this.saveAs(new_file);

       

      Can you please suggest in this?

       

      thank you in advance

       

      regards

      arul