Reputation: 11
I am trying to make some website and would like to ask some questions. The main file for the website is main.asp. In main.asp, I inserted notice.jpg file as a pop up window.
I would like to make that, if I click the pop up window, then the pop up window disappear and the new big window(www.charming.or.kr/jeju/) show up. Can anyone help me on this? The following is part of my source.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr" />
<title><!--#include file="../include/title.asp"--></title>
<style type="text/css">
@import url(../css/comm.css);
</style>
<script language='javascript'>
function OpenWin(dest)
{
posy = screen.Height/2 - 100;
posx = screen.Width /2 - 200;
StartWin = window.open(dest,
"notice_popup","toolbar=no,channelmode=no,left="+posx+",top="+posy+",location=no,directories=no,w idth=743,height=720,resizable=no,menubar=no,scroll=no");
}
</script>
</head>
<body onload="OpenWin('../img/main/Notice.jpg')" >
Upvotes: 1
Views: 6956
Reputation: 5782
In your new window you can refer to your original window by using window.opener
which is a direct reference to your original. You can thus use
window.opener.location.href = newURL;
Upvotes: 2