Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window.opener.location.reload problem

Status
Not open for further replies.

m999ke

Programmer
Nov 16, 2003
1
GB
please can someone explain why this is happening: i have a web page with user details which enables those details to be edited by the user opening a popup window by clicking on a particular link.
the popup window then enables user details to be updated when the popup window form is submitted.
i want the main web page to be updated and filled with new updated user details after the update is made, so i have put the following code in the popup window form: onsubmit="window.opener.location.reload(true);window.opener.focus();window.close()".
this reloads the main web page, and closes the popup window.
i thought this would enable the main web page to reload with the updated user details but it doesn't. on refreshing the main web page though, the updated details show.
can anyone explain why when the page reloads through javascript code the updated details do not immediately show?
 
Instead of window.opener.location.reload(true) try simply window.opener.location = window.opener.location. I've had problems using the reload() method, it keept reloading the page from browsers cache, though it supposed to reload from the server, if you supply boolean true as an srgument.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top