Expand my Community achievements bar.

SOLVED

Open URL Link in new browser window

Avatar

Level 2

Can someone please help me? I've tried to use code as if I were using Dreamweaver without any luck(i.e. blank target).

Is there a way to make the url in the PDF open a new browser windows once clicked? Hopefully this is an easy fix! Thanks in advance!

1 Accepted Solution

Avatar

Correct answer by
Level 10

The code needs to go on the Click event of a button (or checkbox or something that can be clicked!). So you'll see in the sample that I've put an invisible button over the word "here".

If you click on the invisible button in Designer and open the Script Editor you'll see the script in the Click event.

View solution in original post

13 Replies

Avatar

Level 10

Are you editing your PDF using LiveCycle designer or acrobat?

If LiveCycle designer, just drag an Static Text field and type the URL. This will open the page in a new window.

Nith

Avatar

Level 10

If you are targeting v9 or later you can highlight the text and Insert Hyperlink via the right mouse button menu...not sure if that opens in a new window or not though.

Otherwise you would use app.launchURL("http://google.com", true); (javascript) - the "true" opens in a new browser window, the default is "false" which will load it in Acrobat.

Avatar

Level 2

Any way you could actually show it used on an pdf form?

I am still not getting it... sorry.....

Avatar

Correct answer by
Level 10

The code needs to go on the Click event of a button (or checkbox or something that can be clicked!). So you'll see in the sample that I've put an invisible button over the word "here".

If you click on the invisible button in Designer and open the Script Editor you'll see the script in the Click event.

Avatar

Level 5

Thank you. I will give this a try and let you know

Avatar

Level 5

Thanks Jano;

This works like a charm. Thanks for all your help

Chomp

Avatar

Level 3

Juno,

GREAT strategy. Worked for me too! Thank you.

Avatar

Level 1

Jono, if you are still out there.  I am also having trouble with this function.  The button works just fine, but it does not open another browser window.  I am trying to keep my pdf open, and send them to a url.  That way they can come back to the form. Like you would with the target="_blank" function in javascript.

What am i doing wrong?  I have tried opening the script editor, but I am not sure what to do there. So I put the same as you did on your form, no effect.  I put target="_blank" and set it to javascript on just about every option.  I have tried to go into the code on the xml source tab, no luck anywhere.  I have tried to just use a text field, no luck.

Seems like everything I have tried has no effect.

Hopefully you can tell me it is something simple...

Thanks in advance.

Jodi

Avatar

Level 10

Did you download the sample pdf linked above? You should be able to copy and paste that button into your form and then just change the url that the code is pointing to.

The code is on the Click event of the invisible button (you should see its outline in the editor) that is over top of the blue text. With the script editor open you should see the code (you may need to click the "Show:" dropdown in the corner of the editor and change it to "click").

The actual code you'll see on that button in the sample pdf is: app.launchURL("http://google.com", true);

HTML code and JavaScript functions don't work with Designer. And don't mess around in the XML source unless you really know what you're doing, it's pretty easy to break things.

Avatar

Former Community Member

I have tried what you suggested above with no success.

My button will not go over my text.  What am I doing wrong.

I even tried to copy your example with no luck.

Avatar

Level 1

Hi,

Do you still have this PDF example you attached on 05/01/2010.

tried to download it's no longer available.

tks.

Avatar

Level 1

What if you don't have Designer?  I have a group of users that are creating How To PDFs for our company, and they want to link to sites from the PDF.  PDF loads in the browser, but we don't want to lose the context of the How To, so we want to open the linked resources in new tabs/windows.  Primarily IE 11, but may have some Chrome users as well.

Users create the How To docs in Word 2010, and then create the PDFs from there.  Anyone able to assist with getting this to work?

Thanks in advance!!!

Avatar

Level 1

hi,

i send pdf forms to my users which use acrobat reader, is it possible for me to add a button where they can fill the button with a  url text and this text becames a hyperlnk