aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Close Popup and refresh parent 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 "Close Popup and refresh parent" Watch "Close Popup and refresh parent" New topic
Author

Close Popup and refresh parent

pawan chopra
Ranch Hand

Joined: Jan 23, 2008
Posts: 410

Hi All,

I have a form opening in a pop-up window. After submit I want to close pop-up and refresh the parent window. Couldn't find the solution. Can any one help on this?


Pawan Chopra
SCJP - DuMmIeS mInD
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60975
    
  65

A reference to the parent is available in a variable named opener.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
pawan chopra
Ranch Hand

Joined: Jan 23, 2008
Posts: 410

Thanks but it's not working not sure what's happening. below is what I am doing in javascript:



Another problem I am facing is whatever js files I am having in the jsp opened by Popup are not working.

Kindly help on this.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60975
    
  65

Well, if JavaScript isn't working on the page it's not surprising that your JavaScript isn't working? Aren't you putting the cart before the horse?

Solve the big problems first.
pawan chopra
Ranch Hand

Joined: Jan 23, 2008
Posts: 410

I have few javascript files that are used in a jsp. When i am opening that jsp in the same window. Its getting loaded but when I am opening that jsp using window.open its not getting loaded. Really surprised what is the reason behind that.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60975
    
  65

You want me to guess? OK, my guess is that you are using page-relative URLs to reference your JavaScript files. If so, bad idea.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Close Popup and refresh parent