kippie
03-02-2003, 11:18 PM
In the simple HTML below I use an anchor to refer to another location on the same page. It works fine on my pc and also when sending it by mail to other people. Only when someone with a mail.com email-address receives the mail and uses the anchor a new window opens in stead of referring just to another place in the same window. I tried to keep it in the same window by using codes like onclick="this.target='_self';" and onclick="self.location=this.href;return false" but in mail.com it does not seem to work. Does anyone know other ways to prevent a new window opening?
This is the code I use:
<html>
<head>
<title> How about this? </title>
</head>
<body>
<a name="up"></a><br>
Dit is suggestie 1 van Kicken en de script aan het eind. <br>
Ook deze werkt niet<br><br>
<a href="#anchor5" onclick="this.target='_self';">Press for Anchor5</a><br><br>
<a href="#anchor6" onclick="self.location=this.href;return false">Press for Anchor6</a>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br>
<br>
<a name="#anchor5"></a>Here is Anchor5<br>
<a href="#up">Back-UP</a><br><br>
<a name="#anchor6"></a>Here is Anchor6<br>
<a href="#up">Back-UP</a>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<script type="text/javascript">
for (i in document.links){
document.links[i].target='_self';
}
</script>
</body>
</html>
Kippie
This is the code I use:
<html>
<head>
<title> How about this? </title>
</head>
<body>
<a name="up"></a><br>
Dit is suggestie 1 van Kicken en de script aan het eind. <br>
Ook deze werkt niet<br><br>
<a href="#anchor5" onclick="this.target='_self';">Press for Anchor5</a><br><br>
<a href="#anchor6" onclick="self.location=this.href;return false">Press for Anchor6</a>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br>
<br>
<a name="#anchor5"></a>Here is Anchor5<br>
<a href="#up">Back-UP</a><br><br>
<a name="#anchor6"></a>Here is Anchor6<br>
<a href="#up">Back-UP</a>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<script type="text/javascript">
for (i in document.links){
document.links[i].target='_self';
}
</script>
</body>
</html>
Kippie