aspose file tools*
The moose likes Applets and the fly likes Applet Opening new html window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet Opening new html window" Watch "Applet Opening new html window" New topic
Author

Applet Opening new html window

Denny Ong
Greenhorn

Joined: Jan 15, 2004
Posts: 1
Hi, how can I open a new browser window from clicking a button in the applet?
Brian Pipa
Ranch Hand

Joined: Sep 29, 2003
Posts: 299
If you want to keep your applet running and launch the URL in a new browser window, you can use this:
appletContext.showDocument(new URL(destURL), "_blank");
where appletContext is your AppletContext
Brian


My Java Freeware:<br />MACCC - <a href="http://maccc.pipasoft.com" target="_blank" rel="nofollow">http://maccc.pipasoft.com</a><br />Nator - <a href="http://nator.pipasoft.com" target="_blank" rel="nofollow">http://nator.pipasoft.com</a>
David Vickers
Greenhorn

Joined: Oct 02, 2003
Posts: 13
Hi, I do the above, and it works fine, but is there a way to monitor when the new page is closed, and also can it be set to not have buttons, status etc, like a frame.
I know you can use window.open(x,y,etc,etc) to set this up as a javascript call, but can it been done from an applet. alternative, can the 'window' remove the buttons, as it can resize with window.resizeTo(x,y).
Cheers
 
 
subject: Applet Opening new html window
 
Similar Threads
How to open a Dialog window from an Applet
closing !!
load applet
Applet initialization problem
Unable to create an instance!!