• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Discrepancy in closing popup window in Netscape & IE

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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-
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How long does the servlet run without closing the window?
 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
when your children are suffering from your punishment, tell your them it will help them write good poetry when they are older. Like this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic