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

Add redirect to Submit button on PDF Form

Community Beginner ,
May 05, 2014 May 05, 2014

I need someone that knows javascript to help me out! 

I have saved the FormsCentral PDF Form locally and opened it up with Acrobat Pro XI, saved it as a copy, and then opened the new document in Acrobat Pro XI.  I am able to see the javascript that the FormsCentral Submit button placed in the form.

How can I get the submit button to do what it is supposed to do (below), but then when its completed it should redirect to a different web page that I specify in the javascript code - in the SAME window, not in a new window.

The submit button javascript code looks like this:

var url = 'https://adobeformscentral.com/pdfsubmit?f=bbbbbbbbbbbb';

var qParams = '&os=' + app.platform + '&sl=' + app.language + '&spv=1';

var fIndex = url.indexOf('#FDF');

url = url.substr(0, fIndex) + qParams + url.substr(fIndex);

var charset = 'utf-8';

if (app.language == 'JPN')

charset = 'Shift-JIS';

this.submitForm({cURL:url, cSubmitAs:'HTML', cCharset:charset});

Do I need to add a location.href = "http://mydomain.com/completedpdf"; to make the current window then load the completedpdf web page?  And how do I add the command to the end of this javascript?

Or is there some other javascript I should use?

Thank you for your help!

R

708
Translate
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 Employee ,
May 06, 2014 May 06, 2014
LATEST

This is a question that is better suited for the Acrobat forums. 

Translate
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