![]() |
![]() |
|
|
|||||||
| Programmierung Rat & Tat für Programmierer |
|
|
Themen-Optionen | Ansicht |
|
|
#14 |
|
Inventar
![]() Registriert seit: 13.06.2001
Beiträge: 1.830
|
Ich hab's bei mir jetzt so zum laufen gebracht:
Auf den Seiten: Code:
<script>
if (top.location.href.indexOf('main.html')==-1){
document.location.href = 'main.html?seite2.html';
}
</script>
In der Framedatei: Code:
<html>
<head>
<script>
function setUrl(){
var param=document.location.search;
if(param != ""){
//das ? am Anfang entfernen:
param=param.substring(1,param.length);
document.getElementById('inhalt').src = param;
}
}
</script>
</head>
<frameset cols="20%,80%" onload="setUrl()">
<frame name="menue" src="menue.html"></frame>
<frame name="inhalt" src="inhalt.html" id="inhalt"></frame>
</frameset>
</html>
Ich hab' das ganze in eine eigene Funktion gesteckt, die aufgerufen wird, wenn die Seite fertig geladen ist (onload). Aus irgendeinem Grund hat's anders nicht funktioniert. Jak
____________________________________
Join the DNRC | Godwin\'s Law (thx@stona) Documentation is like sex: If it\'s good, it\'s very, very good. If it\'s bad, it\'s better than nothing. \"In theory, theory and practice are the same. In practice, they are not\" (Lawrence Berra) |
|
|
|
| Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1) | |
|
|