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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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.
 
wood burning stoves
 
subject: Modal window and its side-effects
 
Similar Threads
can't get my child window to close and reload the parent.
Dynamically created {input type=file}
to close an opener
Need urgent Help - Browser is hanging
Java Plugin Problem 1.3.1_02