Sven Mintel
Mitglied
Allerdings gibt es mehrere Anker in Seite C (die angesprungen werden sollen)...
Dann sollte Quaeses Lösung das Richtige sein
(der Einsatz von PHP wäre allerdings günstiger, weil es dann auch ohne aktiviertes JS geht)
Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
Allerdings gibt es mehrere Anker in Seite C (die angesprungen werden sollen)...
window.onload = function(){
if(location.hash.length != 0){
self.iframename01.location += (location.hash.substr(0,1)=="#")? location.hash : ("#"+location.hash);
}
}
<script type="text/javascript">
function LinkAnker () {
window.onload = function(){
if(location.hash.length != 0){
self.iframename01.location += (location.hash.substr(0,1)=="#")? location.hash : ("#"+location.hash);
}
}
</script>
Hi,
ein Blick in die JS-Referenz von deiner Seite aus, kann da wirklich nichts schaden, wenn du nicht sattelfest bist.
- http://de.selfhtml.org/javascript/intro.htm#javascript_htmltags
- http://de.selfhtml.org/javascript/intro.htm#javascriptdateien
- http://de.selfhtml.org/javascript/objekte/location.htm
mfg Maik
<script type="text/javascript">
function LinkAnker () {
window.onload = function(){
if(location.hash.length != 0){
self.iframename01.location += (location.hash.substr(0,1)=="#")? location.hash : ("#"+location.hash);
}
}
</script>
<a href="extern01.html#anker-info-wettbewerbe">
<html>
<head>
<title>www.tutorials.de</title>
<meta name="author" content="Quaese">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!--
window.onload = function(){
if(location.hash.length != 0){
self.iframename01.location += (location.hash.substr(0,1)=="#")? location.hash : ("#"+location.hash);
}
}
//-->
</script>
</head>
<body>
<iframe name="iframename01" src="iframedoc.html"></iframe>
</body>
</html>
<a href="iframedoc.html#anker02" >
<html>
<head>
<title>www.tutorials.de</title>
<meta name="author" content="Quaese">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
</head>
<body>
<a href="#" onclick="window.location.href='b.html#anker'; return false;">Dokument b mit Anker für iFrame-Dokument c</a>
</body>
</html>
<html>
<head>
<title>www.tutorials.de</title>
<meta name="author" content="Quaese">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!--
window.onload = function(){
if(location.hash.length != 0){
self.iframename01.location += (location.hash.substr(0,1)=="#")? location.hash : ("#"+location.hash);
}
}
//-->
</script>
</head>
<body>
<iframe name="iframename01" src="c.html" width="100%" height="300"></iframe>
</body>
</html>
<html>
<head>
<title>www.tutorials.de</title>
<meta name="author" content="Quaese">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
</head>
<body>
<div style="background: #fff; height: 600px;">Höhe</div>
<div id="anker">Ich bin der Text am Ankerpunkt <i>anker</i></div>
</body>
</html>