[color red]
[b]PAGE1.HTML[/b]
<html>
<head>
</head>
<body>
<a href="page2.html" target="_blank">click me</a>
<p>adasda</p><p>adasda</p><p>adasda</p><p>adasda</p><p>adasd
a</p><p>adasda</p><p>adasda</p><p>adasda</p>
<p><a name="#somethingelse"></a>anchor 1</p>
<p>adasda</p><p>adasda</p><p>adasda</p><p>adasda</p><p>adasd
a</p><p>adasda</p><p>adasda</p><p>adasda</p><p>adasda</p><p>
adasda</p><p>adasda</p><p>adasda</p><p>adasda</p><p>adasda</
p><p>adasda</p><p>adasda</p><p>adasda</p><p>adasda</p><p>ada
sda</p><p>adasda</p><p>adasda</p><p>adasda</p><p>adasda</p><
p>adasda</p><p>adasda</p><p>adasda</p><p>adasda</p><p>adasda
</p><p>adasda</p><p>adasda</p><p>adasda</p><p>adasda</p><p>a
dasda</p><p>adasda</p><p>adasda</p><p>adasda</p><p>adasda</p
><p>adasda</p><p>adasda</p><p>adasda</p><p>adasda</p><p>adas
da</p><p>adasda</p><p>adasda</p><p>adasda</p><p>adasda</p>
<p><a name="#somethingelse2"></a>anchor 2</p>
<p>adasda</p><p>adasda</p><p>adasda</p><p>adasda</p><p>adasd
a</p><p>adasda</p><p>adasda</p><p>adasda</p><p>adasda</p><p>
adasda</p><p>adasda</p><p>adasda</p><p>adasda</p><p>adasda</
p><p>adasda</p><p>adasda</p><p>adasda</p><p>adasda</p><p>ada
sda</p><p>adasda</p><p>adasda</p><p>adasda</p><p>adasda</p><
p>adasda</p><p>adasda</p><p>adasda</p><p>adasda</p><p>adasda
</p><p>adasda</p><p>adasda</p><p>adasda</p><p>adasda</p><p>a
dasda</p>
</body>
</html>
[/color]
[color green]
[b]PAGE2.HTML[/b]
<html>
<head>
<script>
function Gm(url){
//this function names the 'window.opener.location' the url attribute of the function Gm
window.opener.location=url
}
</script>
</head>
<body bgcolor="#FFFFFF">
<form>
<!--- you will have to place the page in a <form> tags like I did above to make this work.
Now use the onClick event handler to call the function that points to the parent window and the anchor tag in question. At the same time, once the user clicks the link, the 'window.close()' feature will close the child window. If you don't want to close the child window but want to put focus on the parent window do 'window.opener.focus()' (see second link for example) --->
<a href="javascript:void(0)" onClick="Gm('page1.html#somethingelse'); window.close();">click, and window will close afterwards</a>
<br>
<br>
<br>
<a href="javascript:void(0)" onClick="Gm('page1.html#somethingelse2'); window.opener.focus();">click, and focus is shifted to the main window</a>
</form>
</body>
</html>
[/color]