Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

xfa.host.gotoURL not working

Avatar

Former Community Member
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

Former Community Member
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

Former Community Member
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

Former Community Member
zkelly;



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

Avatar

Former Community Member
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