1 Reply Latest reply on Feb 11, 2012 1:50 PM by try67

    Create a Button that Opens a Specific Web Link from a Dropdown Box

    Darkspace86

      Hi guys.  My main question is, how do I make a Button that opens a specific Web Link, depending on the URL selected in a Dropdown box?

       

      Example:

      weblink.png

       

      I'm a comlpete newbie and need a code sample of how this would work!  Thanks!

       

      I have a couple other questions which are related to this. 

       

      1) Is it possible to hide the URL in the Dropdown list, and only show the Name, so for examlpe, it would only list Hotmail, Gmail, Yahoo, and not the www....com?

       

      2) Another more advanced question is, once the web link is opened, is it possible to have adobe input or fill-in the Login and Password fields into the website and then hit "Enter" for you.  The Username and Password would be stored somewhere in adobe and would depend on the weblink opened. So for example: When you open Hotmail, it would use the following; Username:bob@hotmail.com and Password:password1, but if you opened Gmail, it would use a different Username and Password stored for Gmail.

       

      3) Finally, out of curiousity, is it possible to have adobe extract data from a website, and fill them into an adobe form?  This maybe over my head, but any starting point or examples would be of great help!

        • 1. Re: Create a Button that Opens a Specific Web Link from a Dropdown Box
          try67 MVP & Adobe Community Professional

          Use something like this as the button's MouseUp action:

           

          app.launchURL(this.getField("URL Dropdown").value));

           

          To answer your other questions:

          1) Yes. Place the URL as the export value of each option, and the name of the site as the display value. The code I provided can remain the same.

          2) No.

          3) Might be possible, but it's very tricky. The way to do it would be to convert the website to a PDF, process that PDF to extract the data from it, and then use that to populate the form fields. That would require quite advanced scripting knowledge, but it could be possible.