Forum Moderators: coopster
i am not even sure if this is possible, here is my problem, i have a popup window where the user selects a number of questions
(kinna like facebook where you add people as friends from the popup window)
so when the user hits the button next to the question that question id is written to the cookie, when the user hits done the window closes and you are back at the main page, the problem is i have to hit refresh to get the values from the cookie...
is their anyway i could force this refresh?
thanks
dave
yaaarr
3 steps:
---------------
A) in head of page put this:
<script language="javascript">
function close_and_reload_parent()
{
opener.location.href='file_to_refresh.htm';
self.close();
}
</script>
B) Modify your <body> tag to look something like this: <body <? if ($SelfClose=="ok"){?>onload="close_and_reload_parent()"<? }?>>
C) Modify your scipt in a way that when time comes for close and refresh, a variable like $SelfClose will get the value of "ok" ($SelfClose="ok"; for example). This better happens above the <head> of your page.
So, in the end (when page loads for the final time) you will have something like:
- $SelfClose = "ok";
- Javascript in head section of page
- <body onload="close_and_reload_parent()"> (since the if... statement is set to true/valid)
Hope this helps