Hallo Christian,
was Du suchst ist "onUnload" (beim Verlassen der Datei)
tritt ein, wenn eine HTML-Datei verlassen wird.
Nach JavaScript (Netscape) und HTML 4.0 erlaubt erlaubt in folgenden HTML-Tags:
<frameset> <body>
Beispiel fuer das oeffnen eines anderen Fensters aus "dasda.htm" - jetzt nicht getestet
....
mywin = window.open("dieses.htm","mywin","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,height=440,width=221"
if (mywin != null)
{
if(mywin.opener == null)
{
self.location="dasda.htm";
mywin.opener = this;
}
mywin.focus();
}
...
und hier ist "dieses.htm"
<html>
<head>
<script language="JavaScript"><!--
function machwas()
{
if(opener.location) // gibt's noch den opener?
{
opener.xxx; //dann mach irgendwas im opener
}
}
//--></script>
</head>
<body onunload="machwas()">
...
...
</body>
</html>
Viele Grüße Günter