Hallo zusammen,
ich habe ein Problem mit javascript, dass hier sehr warscheinlich schon behandelt wurde.
Aber ich finde einfach nicht die richtigen Infos hier.
Deshalb möchte ich selber nochmal hier nachfragen.
Also, ich habe ein Frameset mit 3 frames. Es werden nur php-seiten dargestellt (im frameset)
im "mainFrame" hat man die möglichkeit auf Vollbild umzuschalten, d.h. der Frame wird "top".
Nun soll man aber die Möglichkeit haben, wieder zurück auf "Frameset" schalten zu können.
Dabei soll aber der Inhalt der momentanen Vollbildseite im Frameset auch wieder erscheinen.
(Die Vollbildseite ist dynamisch)
Ich möchte mit meinem Script die Adresszeile der momentanen Vollbildseite
als URL an das Script übergeben.
Hier das Script ...
<SCRIPT LANGUAGE="JavaScript">
<!--
if(top.location.href != self.location.href)
document.writeln('<A HREF="'+self.location.href+'" TARGET="_top">Vollbild</A>');
/// HIER kann man wohl auch mit "else" weitermachen, nur wie ?? ;-) ///
if(top.location.href == self.location.href)
document.writeln('<A HREF="'+top.location.href+'"onClick="Framing()">Frameset</A>');
function Framing()
{
if (this.document == top.document ||
top.location.host != this.location.host){
var pathprefix = location.protocol + '//' + location.host+ location.pathname.substring(0, location.pathname.lastIndexOf('/')+1);
var doctitle = document.title;
document.clear();
document.open("text/html");
document.writeln('<html>\n<head><title>'+doctitle+
'</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>');
document.writeln('<frameset rows="72,*" cols="*" framespacing="0" frameborder="NO" border="0">'+
'<frame src="top.php" name="topFrame" scrolling="NO" noresize>'+
'<frameset rows="*,52" frameborder="NO" border="0" framespacing="0">'+
'<frame src="'+top.location.reload()+'" name=mainFrame >'+ // Das ist die entscheidende Zeile ... ///
'<frame src="bottom.php" name="bottomFrame" scrolling="NO" noresize>'+
'</frameset>'+
'</frameset></html>');
document.close();
return true;
}
return false;
}
// --->
</script>
Wenn mir jemand dieses Script lauffähig umschreiben könnte,
oder mir nur die funktion zum URL auslesen schreiben könnte, wäre das Klasse
Bei unklarheiten kann ich natürlich noch weitere Infos geben.
Danke an alle die helfen.
P.S. bitte nur direkte Antworten und keine weiterführenden links ...
ich habe mich schon halb tot gelesen