Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

xfa.host.gotoURL not working

Avatar

Not applicable
Hi all,



I'm running Designer 7.1 and the function xfa.host.gotoURL("some Url") doesn't seem to be working anymore. It worked in previous versions. Is it me or am I missing something?
4 Replies

Avatar

Not applicable
I'm using Designer 7.1 with Acrobat 7.0.8 and the following code works just fine for me (in both FormCalc and JavaScript):



xfa.host.gotoURL("http://www.adobe.com");


Note that this is a
client only method. Make sure that the Run At property is set to
Client.



If setting the Run At property to
Client doesn't fix the problem, it would be useful if you could give me a little more context with regards to your particular scenario: How is the xfa.host.gotoURL function being called? What version of Acrobat are you using? Is the form loaded in stand-alone Acrobat or within the browser plug-in when xfa.host.gotoURL doesn't work?



Stefan

Adobe Systems

Avatar

Not applicable
Yeah I'm running Designer 7.1 with Reader 7.0.8. I'm executing the code during the click event of a button on the client side. Also I am trying this on a standalone PDF with one button on the page.



Bizare. Anyways I'm using:

app.launchURL("http://www.adobe.com");



as I want it to open a browser window. Oh which works 🙂



Thanks for your help Stefan.

Avatar

Not applicable
zkelly;



Can the code you mentioned there be amended to have the link open in a new window - similar to a target="_blank"?

Avatar

Not applicable
Certainly: You can use the second parameter of the app.launchURL method to specify whether the URL should be opened in a new window.



app.launchURL("http://www.adobe.com", true); // open in new window

app.launchURL("http://www.adobe.com", false); // same as app.launchURL("http://www.adobe.com") >> opens in same window


Stefan

Adobe Systems