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

Call example.com with a text filed

New Here ,
Mar 14, 2023 Mar 14, 2023

On my form I have Text9 where a person enters an address like:   2950 E Sherr Ct

 

I want to have a button that calls a javascript that does the following

1. Convert 2950 E Sherr Ct to the format 2950-E-Sherr-Ct

2. call https://example.com/2950-E-Sherr-Ct 

done

 

I appreciate the help

 

[moderator modified link to remove the actual company site. This could be considered as spam.]

 

 

TOPICS
JavaScript , PDF forms
523
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 ,
Mar 14, 2023 Mar 14, 2023
LATEST

Try this:

var str = this.getField("Text9").valueAsString;
var aLink = str.replace(/ /g, "-");
app.launchURL("https://example.com/"+aLink);
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