Naughty.Coder
Naughty.Coder

Reputation: 3960

Opening a window and getting its URL?

Are java applets capable of opening new browser windows and retrieving their end URL?

Upvotes: 0

Views: 138

Answers (2)

Andrew Thompson
Andrew Thompson

Reputation: 168845

Are java applets capable of opening new browser windows and retrieving their end URL?

No, and it is really none of the applet's business. It is a security thing.

Imagine you control an applet that opens an innocuous window. I get bored with that and reuse the window to surf over to BigBustyBabes.com instead. That final URL is not something I (as a user) would want your applet to know.

Upvotes: 2

Mihai Bujanca
Mihai Bujanca

Reputation: 4219

This link might help with opening a new URL, but from the same browser window. However assuming that you can reach the path where a browser is, you could easily run it. However I think this can be done easier with javascript, at least the part with retrieving the end URL, javascript seems to be the solution.

For opening a new window with javascript: window.open(URL,name,specs,replace).
For retrieving a URL with javascript use document.URL

Upvotes: 0

Related Questions