This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Applet Opening new html window
 
Similar Threads
load applet
Unable to create an instance!!
Applet initialization problem
closing !!
How to open a Dialog window from an Applet