I have a page where opens a child page with javascript. the code is like below:
onclick='window.open("http://mysite.com/pagename",
"loginWindonw",
"width=800,height=600,left=150,top=100"
);
return false;'
in the child window, when user logs in, I redirect them back to the main window and close the child window.
<script type="text/javascript">window.opener.location.href="mysite.com";
window.close();
</script>
This works all fine. but Now I want the child window to close and the parent window to refresh. how can I do this? any tips would be appreciated.
If I understood well, you want to bring the user back to the same page they opened the logging window from, but first log them in, right? Then you may just want to refresh the page in the parent window after logging in: