These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Form with link to url

kimmerdog
Registered: Apr 24 2008
Posts: 20

Hi, I have a form that I created in Livecycle and I want to be able to click on "Terms and Conditions" and it will open up the website with the T&C. Does anyone know what I have to write in javascript to do this? URGENT

My Product Information:
LiveCycle Designer, Windows
jonom
Registered: Jan 31 2008
Posts: 133
If you are targeting v9 or later you can highlight the text and Insert Hyperlink via the right mouse button menu.

Otherwise you would use [b]app.launchURL("http://google.com", true);[/b]. The "true" opens in a new browser window, the default is "false" which will load it in Acrobat.
urlgurl
Registered: Jul 28 2010
Posts: 15
Using the app.launchURL solution probably means the hyperlink needs to be attached to a button, right? Is there a way to apply the script to inline text? (I need to force the target page to open in a new browser window or tab, because otherwise the user loses all data that they entered when they return back to the form.)
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Hi,

you can use a general text field set to "rich text" to insert hyperlinks directly into the text.
Therefore you need to modify the XML source.

1. Select the text field
2. Switch to the XML source view
3. Look for this line, while the text beween the tag is the rich text.
<body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><p>Welcome to Acrobat Users Community.</p></body>
4. Insert a html tag to generate a hyperlink, such as.
<body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><p>Welcome to <a href="http://www.acrobatusers.com/">Acrobat Users Community</a>.</p></body>

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs