aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes how to close pop up window? 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 "how to close pop up window?" Watch "how to close pop up window?" New topic
Author

how to close pop up window?

Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1277

I am creating as jsp as an pop-up menu now after some evenet(day button press) I have to close that window no idea how to do it?


No Kaustubh No Fun, Know Kaustubh Know Fun..
Roshan Ramesh
Greenhorn

Joined: Jul 12, 2010
Posts: 8
The button used to close the window is associated with an event called "onclick" which can be added as an attribute to the button declaration.
All you need to do is to call the "window.close()" DOM method in the value of this attribute.
Hence, you need something like this onclick="window.close()"

Is this is all what you wanted...?
Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1277




I Tried it and many more thing but all comes to failure...
Roshan Ramesh
Greenhorn

Joined: Jul 12, 2010
Posts: 8
Does the below line of code too fails in your application...?
onclick="javascript:window.close();"
Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1277

Yes it is also not working...

basically I am using two jsp first one is ManageUser.jsp ...from I am calling another jsp ManagerUSerEdit,jsp(which works as a pop-up)

Code for calling ManagerUSerEdit.jsp from ManageUser.jsp

Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1277

Hurray

The below code works for me

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to close pop up window?