Click to See Complete Forum and Search --> : page refresh from popup


tripwater
06-02-2003, 11:29 AM
I have a page that when you click on a start link it has a popup window that inserts a record into my DB on a start time.

I then want them to close the popup and refresh the parent page to now show the stop link to stop their time. is this possible? I need to refresh the parent page because the variable I am looking for is now set to show the stop link once their time is logged but does not show it unless the page is refreshed.



So I set a global (session var) on the parent page.

click link to open popup to start time. set the global var to stop.

close popup window. refresh parent window to show stop link

thanks for any help

requestcode
06-02-2003, 11:39 AM
You could set up a link for them to close the popup that would perfrom a function to reload the parent page and close the popup like this:
function refresh()
{
opener.location.reload()
window.close()
}

<a href="javascript:refresh()">Click Me</a>

The term "opener" refers to the parent window that opened the popup.

tripwater
06-02-2003, 11:46 AM
thank you for the reply.

That worked