window.captureEvents(Event.CLICK) javascript error

H

harry

Hi
I am trying to add an event handler to the window so that If the user clicks
the close window button, it creates a popup to tell the user it should use
the log out button before closing window.

When I try to this:
window.captureEvents(Event.CLICK);
I get a javascript error saying the "Event" is undefined.

Here is how I use the code
<html>
<head>
<script language="JavaScript" type="text/javascript">
<!--
window.captureEvents(Event.CLICK);
window.onclick= test

function test(event){
//do something
}

// -->

</script>
</head>
<body>

Running Win2000, IE 6.02. Same result on XP.
Anyone have ideas?
thanks
Harry
 
R

Rutger Smit

harry said:
Hi
I am trying to add an event handler to the window so that If the user clicks
the close window button, it creates a popup to tell the user it should use
the log out button before closing window.

When I try to this:
window.captureEvents(Event.CLICK);
I get a javascript error saying the "Event" is undefined.

Here is how I use the code
<html>
<head>
<script language="JavaScript" type="text/javascript">
<!--
window.captureEvents(Event.CLICK);
window.onclick= test

function test(event){
//do something
}

// -->

</script>
</head>
<body>

Running Win2000, IE 6.02. Same result on XP.
Anyone have ideas?
thanks
Harry


Wrong group Harry, this is for asp.NET only.

window.captureEvents(Event.CLICK) is a NON IE thing.

//Rutger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top