Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Closing the browser window in JSP

 
Sujai Kaarthik
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64698
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP operates on the server and has no control over the browser window.
 
Sujai Kaarthik
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear for your quick reply
 
Naga Niranjan
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Naga Niranjan

but we can create a button outside the form and can achieve it. isnt it?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic