• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Modal window and its side-effects

 
K Aditi
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put the

window.location.reload(true);

line after the modal window line.

Eric
 
K Aditi
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Eric.It worked.
 
K Aditi
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic