Open URL in new window using JavaScript

Avatar

Avatar

_James_J_Gallag

Avatar

_James_J_Gallag

_James_J_Gallag

24-09-2008

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

Replies

Avatar

Avatar

pguerett

Avatar

pguerett

pguerett

24-09-2008

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);

Avatar

Avatar

_James_J_Gallag

Avatar

_James_J_Gallag

_James_J_Gallag

25-09-2008

Paul,



That worked like a dream, thanks.



James

Avatar

Avatar

_James_J_Gallag

Avatar

_James_J_Gallag

_James_J_Gallag

25-09-2008

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

Avatar

Avatar

pguerett

Avatar

pguerett

pguerett

25-09-2008

That command will not work form a guide. It is not supported....only in a PDF.

Avatar

Avatar

_James_J_Gallag

Avatar

_James_J_Gallag

_James_J_Gallag

25-09-2008

Ok thanks Paul.



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



Thanks,

James

Avatar

Avatar

pguerett

Avatar

pguerett

pguerett

25-09-2008

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

Avatar

Avatar

_James_J_Gallag

Avatar

_James_J_Gallag

_James_J_Gallag

26-09-2008

Ok thanks Paul.