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

Open URL in new window using JavaScript

_James_J_Gallag
Level 3
Level 3
Hi Guys,



Hopefully someone can help me with this.

By clicking a button I would like IE or whatever the default browser is to be launched with a specific URL.



I have tried using: xfa.host.gotoURL("http://www.google.com");

but obviously this opens within the window I'm working in. Close but not close enough.



Thanks in advance!



James
7 Replies
pguerett
Level 10
Level 10
I believe you can add another boolean parameter that tells whether to start a new browser or not......or you can use this command:



app.launchURL("address", true);
_James_J_Gallag
Level 3
Level 3
Paul,



That worked like a dream, thanks.



James
_James_J_Gallag
Level 3
Level 3
Paul,



When I do a Preview PDF when designing the form and click the button then a new window with my URL opens but when I preview the Form Guide and press the button it does nothing. I've double checked that the language I'm using in Javascript.



Any help is much appreciated



James
pguerett
Level 10
Level 10
That command will not work form a guide. It is not supported....only in a PDF.
_James_J_Gallag
Level 3
Level 3
Ok thanks Paul.



Do you know of any way to launch a new window from the Form Guide??



Thanks,

James
pguerett
Level 10
Level 10
Not without modifying the guide style ...certainly Flex can do it but that fuctionality has not been exposed in our guide styles.