aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Reloading Calling Page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Reloading Calling Page" Watch "Reloading Calling Page" New topic
Author

Reloading Calling Page

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1391
I have a link on my HTML page that opens a another page. When the called page is closed I need it to run the following code. I have a link on the called page that will do this however I cannot guarantee the user will click the link. How can I make sure this code will run if user just closes the window?

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60082
    
  65

You can't tell the difference between the user closing the window and navigating away.

What are you really trying to accomplish? Whatever it is, this isn't the way to do it.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1391
Bear Bibeault wrote:
What are you really trying to accomplish? Whatever it is, this isn't the way to do it.



Page 1 has record header data and a table showing child records. There is a link that is used to open another window(window 2) to add more child records. When window 2 closes I want to make a call to the servlet that feeds the window 1 page. Lastly I want the window 1 to reload so the new child records show up.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60082
    
  65

Ah, that's a bit clearer. If you don't care about the difference between closing and navigating away, the beforeunload event might be of help.
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1391
Bear,

I decided to create a input row on the main form itself to add new child records. I hope this is a correct choice.

Thanks for the help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reloading Calling Page
 
Similar Threads
Refresing Calling Page
window.opener.location.href refereshes the page only once
JSP JavaScript Query
Refresh datatable
Close main window from popup window