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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a parent opening a child. I 1

Status
Not open for further replies.

enak

Programmer
Jul 2, 2002
412
0
0
US
I have a parent opening a child. I then navigate to a second page in the child window. Now I have two windows open but the child window is displaying a second page. When I click on a button in the child window I am trying to send data back to the parent window and close the child window. The child closes ok but when the parent is reloading I get a message from the browser that states that I need to resend the page to the server.

When I resend the page all of the changes are displayed on the parent that I would expect. How can I get rid of the "Resend" message?

Here is the code:

window.opener.location.reload();
window.close();


I have even tried:

window.opener.location = window.opener.location.href;
window.close();

TIA
Nate

 
I don't know much about this but try:

window.opener.location.reload(true);

This does an unconditional GET rather than the default conditional GET which will reload from cache if available.
 
This did not help but thanks anyway.

A little more information...

I am submitting the page and then the code above, which is clientside, is executed.
 
instead of reloading the page, reopen the page by the page name. Just a idea, and I don't know if it will work.
 
I'm guessing the parent window was generated by a form using the post method. You could put a form tag on the parent page that submits to itself and includes all the parameters that were used to create the parent page in the first place.

<form action=&quot;parentPage.asp&quot; method=&quot;post&quot;>
<input type=&quot;hidden&quot; name=&quot;param1&quot; value=&quot;whatever&quot;>
<input type=&quot;hidden&quot; name=&quot;param2&quot; value=&quot;somethingElse&quot;>

Then submit the parent page form from the child window to reload it.
window.opener.forms[0].submit();
window.close();

I hope that made sense.
 
adam0101, that was the solution. Thanks a whole lot for your great suggestion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top