aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Closing the browser window in JSP 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 "Closing the browser window in JSP" Watch "Closing the browser window in JSP" New topic
Author

Closing the browser window in JSP

Sujai Kaarthik
Ranch Hand

Joined: Dec 29, 2008
Posts: 162
Hi friends,
I am creating an application and almost finished it. I have no problem with the coding part. Here goes my scenario:

When i generate a report, the report will open in a new browser window. When the user views it and clicks 'ok', I have written a piece of code in seperate file that deletes those details from the database. Now, I need to close the report window once the 'ok' button is clicked. Is there any such method in JSP that automatically closses the window or we have to write in script?


PS: I am a beginner of JSP


The greater danger for most of us is not that our aim is too high and we miss it, but that it is too low and we reach it
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

JSP operates on the server and has no control over the browser window.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Sujai Kaarthik
Ranch Hand

Joined: Dec 29, 2008
Posts: 162
Thanks Bear for your quick reply
Naga Niranjan
Greenhorn

Joined: Aug 02, 2005
Posts: 25
By using Java Script, can achieve this. But th problem is you cannot submit your form to the server for further actions.
Sujai Kaarthik
Ranch Hand

Joined: Dec 29, 2008
Posts: 162
@Naga Niranjan

but we can create a button outside the form and can achieve it. isnt it?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6


Eric
 
jQuery in Action, 2nd edition
 
subject: Closing the browser window in JSP