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

308

Likes

translate

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

Adobe Community Professional , Jun 11, 2019 Jun 11, 2019
Hi,Pretty sure Boolean are all small letters - true as opposed to True.RegardsMalcolm

Likes

translate

Translate

Translate
Adobe Community Professional ,
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

Likes

translate

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.

Likes

translate

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
Most Valuable Participant ,
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.

Likes

translate

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.

Likes

translate

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
Most Valuable Participant ,
Jun 12, 2019 Jun 12, 2019

Copy link to clipboard

Copied

Please share your actual file with us.

Likes

translate

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?

Likes

translate

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
Most Valuable Participant ,
Jun 12, 2019 Jun 12, 2019

Copy link to clipboard

Copied

No, the PDF file.

Likes

translate

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
Adobe Community Professional ,
Jun 12, 2019 Jun 12, 2019

Copy link to clipboard

Copied

Did you re-start Acrobat after changing the code?

Likes

translate

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.

Likes

translate

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