Alexander: onResize & Flash

Beitrag lesen

Habe jetzt selber eine Lösung ohne onResize() gefunden, falls noch mal jemand im Forum nach onResize() + Flash suchen sollte.

<html>
 <head>

<script language="JavaScript">
<!-- // Alte Browser ...

var isNav4Mac = (
(navigator.appName                         == "Netscape") &&
(navigator.appVersion.charAt(0)            == "4"       ) &&
(navigator.appVersion.indexOf("Macintosh") != -1        ));

if (isNav4Mac ) // Nur bei Mac + Netscape 4.x
{
 var intervall = 1000; // Alle wiviel ms soll kontrolliert werden?
 var theWidth  = window.innerWidth;
 var theHeight = window.innerHeight;
 function controlSize()
 {
  // +++++ Kontrolle ob setInterval() funktioniert ++++++
  // var date1     = new Date();
  // window.status = date1.getMilliseconds();
  // ++++++++++++++++++++++++++++++++++++++++++++++++++++

if (window.innerWidth != theWidth || window.innerHeight != theHeight)
  {
   // location.reload(); // Moeglichkeit a, Problem: Ruecksprung zu index.htm
   window.history.go(0); // Moeglichkeit b
   // alert("done");     // Anzeige test
  }
 }
 window.setInterval('controlSize()',intervall);
}
// -->
</script>

</head>
  <body>
  </body>

</html>