Open URL in new window using JavaScript

Avatar

Avatar
Level 3
_James_J_Gallag
Level 3

Likes

0 likes

Total Posts

54 posts

Correct reply

0 solutions
View profile

Avatar
Level 3
_James_J_Gallag
Level 3

Likes

0 likes

Total Posts

54 posts

Correct reply

0 solutions
View profile
_James_J_Gallag
Level 3

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
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

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
Level 3
_James_J_Gallag
Level 3

Likes

0 likes

Total Posts

54 posts

Correct reply

0 solutions
View profile

Avatar
Level 3
_James_J_Gallag
Level 3

Likes

0 likes

Total Posts

54 posts

Correct reply

0 solutions
View profile
_James_J_Gallag
Level 3

25-09-2008

Paul,



That worked like a dream, thanks.



James

Avatar

Avatar
Level 3
_James_J_Gallag
Level 3

Likes

0 likes

Total Posts

54 posts

Correct reply

0 solutions
View profile

Avatar
Level 3
_James_J_Gallag
Level 3

Likes

0 likes

Total Posts

54 posts

Correct reply

0 solutions
View profile
_James_J_Gallag
Level 3

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
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

25-09-2008

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

Avatar

Avatar
Level 3
_James_J_Gallag
Level 3

Likes

0 likes

Total Posts

54 posts

Correct reply

0 solutions
View profile

Avatar
Level 3
_James_J_Gallag
Level 3

Likes

0 likes

Total Posts

54 posts

Correct reply

0 solutions
View profile
_James_J_Gallag
Level 3

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
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

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
Level 3
_James_J_Gallag
Level 3

Likes

0 likes

Total Posts

54 posts

Correct reply

0 solutions
View profile

Avatar
Level 3
_James_J_Gallag
Level 3

Likes

0 likes

Total Posts

54 posts

Correct reply

0 solutions
View profile
_James_J_Gallag
Level 3

26-09-2008

Ok thanks Paul.