aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Discrepancy in closing popup window in Netscape & IE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Discrepancy in closing popup window in Netscape & IE" Watch "Discrepancy in closing popup window in Netscape & IE" New topic
Author

Discrepancy in closing popup window in Netscape & IE

shivakumar sekaran
Greenhorn

Joined: Apr 15, 2001
Posts: 18
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

Joined: Nov 22, 2008
Posts: 18944
How long does the servlet run without closing the window?
Brian Glodde
Ranch Hand

Joined: Jun 27, 2001
Posts: 171
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

Joined: Apr 15, 2001
Posts: 18
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Discrepancy in closing popup window in Netscape & IE
 
Similar Threads
Refresh problem...
Using onUnload
Window Events in Firebug
Unable to change the location of popup window in Netscape and Opera
refresh parent window on child window close