• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

saveAs not prompting if it needs to overwrite

Explorer ,
Jun 11, 2019 Jun 11, 2019

Copy link to clipboard

Copied

Hi again, everyone. I'm having an issue with SaveAs and the bPromptToOverwrite parameter. The pastebin link to my code will be below. For some reason, it just won't prompt me to overwrite if the file already exists. I am calling the folder level script linked below through a mouse up event on a form button, if that makes any difference.

I believe I have the line of code right seeing as the save event still happens without errors, but the dang prompt just won't show up. Any ideas?

[JavaScript] Attempt - Pastebin.com

TOPICS
Acrobat SDK and JavaScript , Windows

Views

793

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 11, 2019 Jun 11, 2019

Hi,

Pretty sure Boolean are all small letters - true as opposed to True.

Regards

Malcolm

Votes

Translate

Translate
Community Expert ,
Jun 11, 2019 Jun 11, 2019

Copy link to clipboard

Copied

Hi,

Pretty sure Boolean are all small letters - true as opposed to True.

Regards

Malcolm

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 12, 2019 Jun 12, 2019

Copy link to clipboard

Copied

I was hoping it was that simple, but no dice. I changed it to lower case but still no prompt.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2019 Jun 12, 2019

Copy link to clipboard

Copied

Your previous code would have resulted in the following error message:

ReferenceError: True is not defined

The fact you didn't notice that suggests to me you're not using the console window correctly. Make sure to enable the option to display it on errors and warnings (via Edit - Preferences - JavaScript), and then try again.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 12, 2019 Jun 12, 2019

Copy link to clipboard

Copied

I've got it enabled but it just didn't popup. I've changed the value now too, so that's resolved, though I still don't get the saveAs prompt.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2019 Jun 12, 2019

Copy link to clipboard

Copied

Please share your actual file with us.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 12, 2019 Jun 12, 2019

Copy link to clipboard

Copied

The code is linked in the OP, but do you want me to upload the actual .js file somewhere? What site would be best?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2019 Jun 12, 2019

Copy link to clipboard

Copied

LATEST

No, the PDF file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2019 Jun 12, 2019

Copy link to clipboard

Copied

Did you re-start Acrobat after changing the code?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 12, 2019 Jun 12, 2019

Copy link to clipboard

Copied

Oh yeah, I've closed and re-opened dozens of times while toying with the script but still don't get the prompt.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines