wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Modal window and its side-effects 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 "Modal window and its side-effects" Watch "Modal window and its side-effects" New topic
Author

Modal window and its side-effects

K Aditi
Ranch Hand

Joined: Mar 17, 2008
Posts: 89
Hi,
I have a jsp page from which I am opening a modal window by using showModalDialog. Through this modal window I am transferring control to a servlet where it does some database processing.
Now I want to close the modal window after servlet processing. I was able to do this by executing the following code in the servlet.


The modal window closes but the window which invoked the modal window is also getting reloaded with the modal window contents.
Any work-around for this?

What I want is, After closing/submitting the modal window, it should close automatically and the parent window should refresh.
Any help will be appreciated.


Aditi
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Put the

window.location.reload(true);

line after the modal window line.

Eric
K Aditi
Ranch Hand

Joined: Mar 17, 2008
Posts: 89
Thanks Eric.It worked.
K Aditi
Ranch Hand

Joined: Mar 17, 2008
Posts: 89
Can I somehow avoid closing the modal window from the servlet?
I'd prefer doing the operation from the parent jsp.
Being pretty new to javascript and jsp/servlet can somebody provide me with a pointer to it?Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Modal window and its side-effects