Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Weird problem with showDocument()

Status
Not open for further replies.

dds82

Programmer
Jun 5, 2002
251
US
I have the following code that runs when the user clicks a button in my Java 2 applet:

Code:
AppletContext context=getAppletContext();
URL url=new URL("http",hostname,-1,"/path-to/Some.Servlet");
context.showDocument(url,"_summarywindow");

I am trying to get the servlet to run in the same window each time the user clicks the button. However, each time the button is clicked, the applet opens a new window. Does anybody know how to get the document to reuse the window that was opened the first time the button was clicked?

Thanks.
 
You can try designing your webpages using frames and specify the target attribute for the links
 
I specifically don't want to use frames. According to the JavaDocs, the target attribute should use and reuse top-level windows if no frame with the supplied name exists. It doesn't seem to be doing that, though...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top