refresh parent and close popup -
09-29-2004
, 11:21 AM
I have an application where in a shopping cart checkout a popup appears
which suggests other items that may go with what was ordered with a
button to add these items to the cart. When the button in the popup is
clicked, the popup should present an added items to cart message, close,
and reload the parent window, so the parent will show the new item in
the cart.
It is all working except the post contents for the parent window are
being lost when it reloads, so instead of getting the checkout page
updated as desired, I am getting an error page that says that the store
had not been defined.
This is the code that I have on the thank you page of the popup:
<script language="javascript">
window.onload=function() {
window.opener.location.href=window.opener.location .href;
if(window.opener.progressWindow) {
window.opener.progressWindow.close()
}
window.close()
}
</script>
I can either send the contents of the tags back to the parent when it
loads again with the javascript, or rely on using the original contents
sent to the parent originally, it does not matter.
Does anyone know how to get the parent to not lose the tags when it
refreshes, or modify the above script so I can pass the variables back
to it when it refreshes?
Thanks,
Marshall |