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

How to open a URL or server link with input text using acrobat text field and submit?

New Here ,
Nov 14, 2019 Nov 14, 2019

I want to create a search field in Acrobat with a hidden URL, when a user adds any text in the search field and submit it should open URL + added text in the browser. 

 

EXAMPLE: 

URL: https://www.community.adobe.com/   (invisible mode )

Search field: forums

SUBMIT

 

The result should be: https://www.community.adobe.com/forums

 

Awaiting your kind response.

TOPICS
Create PDFs , PDF forms
1.2K
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
2 ACCEPTED SOLUTIONS
Community Expert ,
Nov 14, 2019 Nov 14, 2019

You'll need a script for this. 

for example:

 

var cSrchTerm = this.getField("SearchTerm").value;

var cHiddenURL = "http://www.someting.com/";

app.launchURL(cHiddenURL + cSrchTerm);

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

View solution in original post

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
Community Expert ,
Nov 16, 2019 Nov 16, 2019
LATEST

Both the issues you've asked about are String handling/manipulation. 

i.e. how to put strings together. 

The easy answer it so just add ".pptx" onto the end of the result.

 

app.launchURL(cHiddenURL + cSrchTerm + ".pptx");

 

But if you need to test for the existence of the postfix first, it gets more complicated

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

View solution in original post

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
Community Expert ,
Nov 14, 2019 Nov 14, 2019

You'll need a script for this. 

for example:

 

var cSrchTerm = this.getField("SearchTerm").value;

var cHiddenURL = "http://www.someting.com/";

app.launchURL(cHiddenURL + cSrchTerm);

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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
New Here ,
Nov 16, 2019 Nov 16, 2019

Thank you so much for your answer, Thom Parker.

 

I have one more question regarding the file opening through the server path through acrobat.

 

EXAMPLE: 

ServerPath : \\server\folder (invisible mode )

Search field : File Name.pptx (file format .pptx should be invisble)

SUBMIT

 

The result should be : \\server\folder\File Name.pptx

 

Please guide me if any javascript for this, thank you so much once again.

 

 

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
Community Expert ,
Nov 16, 2019 Nov 16, 2019
LATEST

Both the issues you've asked about are String handling/manipulation. 

i.e. how to put strings together. 

The easy answer it so just add ".pptx" onto the end of the result.

 

app.launchURL(cHiddenURL + cSrchTerm + ".pptx");

 

But if you need to test for the existence of the postfix first, it gets more complicated

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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