Put all of these files in the same folder:
index.htm:
_______________
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<a href="popup.htm" target="_blank" onclick="window.open(this.href, this.target, 'width=300, height=300');return false">Pop</a>
</body>
</html>
popup.htm:
_______________
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
function closeLaunch(url){
if(!self.opener){
return true;
}
self.opener.location.href = url;
self.close();
return false;
}
</script>
</head>
<body>
<div>
<a href="somePage.htm" onclick="return closeLaunch(this.href);">Some Page</a><br>
<a href="anotherPage.htm" onclick="return closeLaunch(this.href);">Another Page</a>
</div>
</body>
</html>
somePage.htm:
_______________
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div>
Some Page
</div>
</body>
</html>
anotherPage.htm:
_______________
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div>
Another Page
</div>
</body>
</html>
Any questions?
Bookmarks