How to PopUp a new window
<script language="javascript" type="text/javascript">
<!--
function popitup(url) {
newwindow=window.open(url,'name','height=200,width=150');
if (window.focus) {newwindow.focus()}
return false;
}
// -->
</script>
PS: the Top and Left could control the layout of the new windows
like: top=100; left=100;
<a href="popupex.html" οnclick="return popitup('popupex.html')"
>Link to popup</a>
When Close the PopUp, the Parents window redirect to other page
- <script>
- window.opener.location = "../index.html";
- window.close();
- </script>
- <script>
-
- function windowsClose(){
- window.opener.location = "../index.html";
- window.close();
- }
- </script>