Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q1748 Netscape Navigator 4 loses the onMouseDown event handlers after a window resize

irt.org | Knowledge Base | JavaScript | Bugs | Q1748 [ previous next ]

Q1748 Netscape Navigator 4 loses the onMouseDown event handlers after a window resize

Claude Schnéegans writes:

Ok, here is a cure to the resize and lost onMouseDown event blues. In the body tag, define an onResize event handler which will invoke a reset() function to just set onMouseDown to anything for the link. All event handlers are back! In this example I've done it for link #1 but not link #2. onMouseDown events still work after a window resize for link #1, but not for link #2. Note that link #2 will still generate an onMouseDown event on a double click, but not on a single one:

<html>

<head>

<script language="JavaScript"><!--
function reset() {
  document.links[0].onMouseDown = "";
}
//--></script>

</head>

<body onresize="reset()">

<a href="javascript:void(0);" onMouseDown="alert('Mouse 1 is down');">Testing 1</a>
<br>
<a href="javascript:void(0);" onMouseDown="alert('Mouse 2 is down');">Testing 2</a>
</body>

</html>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.