HighDots Forums  

refresh parent and close popup

Javascript JavaScript language (comp.lang.javascript)


Discuss refresh parent and close popup in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Marshall Dudley
 
Posts: n/a

Default 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


Reply With Quote
  #2  
Old   
VK
 
Posts: n/a

Default Re: refresh parent and close popup - 09-29-2004 , 12:33 PM






see the post "xfering control to JS function at completion of <form> submit"
in this group



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.