How do you get a captureEvents and location.href to work on the same page using and OnClick event on a link. It appears that the captureEvents prevents locaiton.href to be executed.
Basic Example:
<html>
<head>
<title>Test</title>
<script language="Javascript">
<!--
function clickHandler(){
alert("OnClick Captured"
;
}
document.onclick = clickHandler;
if (document.layers) document.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP | Event.MOUSEMOVE);
function redirectPage(){
location.href = ' }
//-->
</script>
</head>
<body bgcolor="#FFFFFF">
<A href="JavaScript:void(0)" onClick="redirectPage()">Test</A>
</body>
</html>
Basic Example:
<html>
<head>
<title>Test</title>
<script language="Javascript">
<!--
function clickHandler(){
alert("OnClick Captured"
}
document.onclick = clickHandler;
if (document.layers) document.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP | Event.MOUSEMOVE);
function redirectPage(){
location.href = ' }
//-->
</script>
</head>
<body bgcolor="#FFFFFF">
<A href="JavaScript:void(0)" onClick="redirectPage()">Test</A>
</body>
</html>