File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes While closing window wants to submit into servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "While closing window wants to submit into servlet" Watch "While closing window wants to submit into servlet" New topic
Author

While closing window wants to submit into servlet

kapildev ganeshan
Greenhorn

Joined: Feb 15, 2006
Posts: 17
Hi,
I wants to remove the session attributes while closing the window.
from the script if I give like this

function closeWindow()
{
alert("Closing the window");
document.formc.reqType.value="closeConn";
document.formc.submit();
window.close();
}

from the servlet I am getting the exception as weblogic.utils.NestedRuntimeException

so any tips/help would be greatly appreciated
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Discussed multiple times in the past week:

http://www.coderanch.com/t/118024/HTML-JavaScript/submit-form-when-closing-browser

Eric
kapildev ganeshan
Greenhorn

Joined: Feb 15, 2006
Posts: 17
Hi Thanks for the reply. I have a button "Cancel" While I am pressiong the cancel it has submitted in to the servlet. But I got the exception as " weblogic.utils.NestedRuntimeException". If I remove the window.close();
from the function then its working fine.May I know the reason for this. Also I wants to close the window in that same time.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: While closing window wants to submit into servlet