Weissbach Michael: Frames nachladen

Ich versuche seit geraumer Zeit, ein Script einzubauen, das mir mein Frameset beim Aufruf einer einzelnen Seite nachlädt.

Mit dem untenstehenden Script habe ich es nun im IE 5 geschafft; nur leider erscheint mir dadurch im Netscape 4.0 eine blanke Seite.

Könnte mir da ev. jemand weiterhelfen? Auch ein anderes Script wäre von Vorteil.

Besten Dank im voraus.

mfg mw

<SCRIPT>
<!--

/*
    check if we are in a framesystem or not and write out a frameset accordingly.
    the random url is for fooling the browser-cache.
*/

if (document.location == top.document.location) {
      var ran = document.location.search ? '&' + Math.random() : '?' + Math.random();

// put the frameset - code here:
      
      top.document.writeln('<FRAMESET cols="125,*" frameborder="NO" border="0" framespacing="0">');
      top.document.writeln('<FRAME name="navigation_g" src="heut_indl.htm" scrolling="no" noresize>');
      top.document.writeln('<FRAMESET ROWS="85,*" BORDER=0 FRAMEBORDER=0>');
      top.document.writeln('<FRAME name="navigation_o" src="../offiziell/navg.htm" scrolling="NO" noresize>');
      top.document.writeln('<FRAME NAME="inhalt" SRC="' + document.location + ran + '" SCROLLING="auto" noresize>');
      top.document.writeln('</FRAMESET>');
}
//-->
</SCRIPT>

  1. Hallo Michael,

    wenn Du folgendes nicht vergisst, sollte es eigentlich gehen:

    document.open("text/html");
    document.writeln('<html>');
    document.writeln('<head>');
    document.writeln('<title>WENN NÖTIG</title>');
    document.writeln('</head>');
    document.writeln('<frameset ......>');
    [...]
    document.writeln('</frameset>')
    document.writeln('</html>');
    document.close();

    Zumindest geht es so bei mir, auch mit Netscape.

    Gruß

    Holger

  2. Hi,

    Mit dem untenstehenden Script habe ich es nun im IE 5 geschafft; nur leider erscheint mir dadurch im Netscape 4.0 eine blanke Seite.

    hast Du Dir den Quellcode des Resultats mal angeguckt? Tip: Speichere es ab, lade es auf den Server hoch und checke es mit http://validator.w3.org/. Du wirst Deinen HTML-Fehler sehr schnell finden, schätze ich...

    Cheatah