This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Getting MEAN with Mongo, Express, Angular, and Node and have Simon Holmes on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes window.opener.location.href  refereshes the page only once 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 "window.opener.location.href  refereshes the page only once" Watch "window.opener.location.href  refereshes the page only once" New topic

window.opener.location.href refereshes the page only once

shiva sarna

Joined: Jul 23, 2006
Posts: 23

I am working on a scheduler, where the user can add events.

As soon as the user adds the event he is taken back to the calendar where he can see the event link appearing beside the selected date.

My problem is this.

Add event is a pop up window and after the user click the Add button I want the calendar page(parent window) to reload.

As I am using struts to implement this there are different classes involved.

I tried
But this call my Add Action class and not the class I want to call.

Then I tried

window.opener.location.href="". This works but only once..that is when the user add events to a date first time, the page get refereshed but if he adds the event the second time the add window just closes without refereshing the page.

I am confused why this is happening. is there a way to reset window.opener.location.href.

thanks for your help in advance



SCJP 5.0
I agree. Here's the link:
subject: window.opener.location.href refereshes the page only once