Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Discrepancy in closing popup window in Netscape & IE

 
shivakumar sekaran
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
This is a kinda strange problem, I am facing in the Netscape 4.7 browser. I open an popup window from the parent window. This popup window has an TextArea and an OK button. After entering the data, i post the same to a servlet and try to close the popup window inside the post method of the servlet, using window.close() function. It takes nearly 2 minutes and 30 seconds for the window to get closed. This is happening in The Netscape alone, whereas in IE it works perfectly. Has anyone faced a similar problem before ? Expecting your help on this....
Thanks on your anticipation.
-shiva-
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How long does the servlet run without closing the window?
 
Brian Glodde
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So does this mean you are passing back some type of reply after the submission takes place? I am a little vague on what you're saying about calling window.close() in your doPost method. Could you post some code to illustrate?
 
shivakumar sekaran
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is exactly the piece of code , i m using. Hope it is clear now. - shiva.
public void doPost(HttpServletRequest request,HttpServletResponse response)
throws ServletException,IOException
{
HttpSession session = request.getSession();
String refNo = (String)session.getValue("refStatus");
String htmlDir = (String)session.getValue("htmlDir");
String notes =request.getParameter("tx"); // returns the text entered in the text area of the pop up window, where "tx" is the name of the text area.
PrintWriter out = response.getWriter();
out.println(" <html> ");
out.println(" <head> ");
out.println(" <script language='javascript'> ");
out.println(" { ");
out.println(" window.close(); ");
out.println(" } ");
out.println(" </script> ");
out.println(" </head> ");
out.println(" </html> ");
} // doPost
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic