How do I get an applet to load a new page into the browser?

John Zukowski

In short, get the applet's context and tell it to show a different document: getAppletContext().showDocument(new URL("http://foo.com/whatever/blah.doc")). You can also provide a target frame string as in getAppletContext().showDocument(new URL("http://foo.com/whatever/blah.doc"), "target"). There are four special targets strings. Any other string will act as a named top-level window, if the frame doesn't exist.

"_self" Show in same frame as applet
"_parent" Show in the applet's parent frame
"_top" Show in the top-level frame of the applet's window
"_blank" Show in a new, unnamed top-level window
About | Sitemap | Contact