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
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: 1446
    
    1
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: 61218
    
  66

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: 1446
    
    1
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: 61218
    
  66

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: 1446
    
    1
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