WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Question about events in IE6, Michael B., September 15, 2004
     Re:Question about events in IE6, Michael B., September 20, 2004
         Re:Question about events in IE6, Brian R. James, September 21, 2004
             Re:Question about events in IE6, Michael B., September 21, 2004

Subject: Re:Question about events in IE6 From: Michael B. Date: September 21, 2004

Thanks, Brian. 

 

 


 

From: Brian R. James
Sent: September 21, 2004
Subject: Re:Question about events in IE6

Michael,
    Check out the following article for help on disabling key combinations in Internet Explorer, even F5 and other pesky commands.

http://www.alphafilter.com/go.foo/article/?aid=69/

Brian R. James

From: Michael B.
Sent: September 20, 2004
Subject: Re:Question about events in IE6

Any ideas?  Poorly worded question?

From: Michael B.
Sent: September 15, 2004
Subject: Re:Question about events in IE6

Hi,

I have an internal, IE only web app and I need to capture certain key combinations and cancel the events. Here is a sample page:

 <html> <head> <title>Test Page</title> </head> <body> <script language="JavaScript"> function KeyDown(){ 	exitValue = true; 	//capture [alt]+[home]  	if(event.keyCode == 36 && event.altKey) { //          alert("got it") 	    document.all['messageArea'].innerHTML = "Got it!"; 	    event.keyCode=0 	    event.returnValue=false 	    exitValue=false 	} 	return exitValue } document.onkeydown=KeyDown </script>  <div id="messageArea">Loaded ... </div> </body> </html> 


If you look at the part where the alert is, you'll see that it's commented out. With it commented out, all of the code runs and then you still get sent to the home page (alt + home). However, when the alert is called, the code runs and you are NOT sent to the home page.

Finally, the question:

What is happening to the event when an alert is called? Is there another way to cancel the event without opening a new window or an alert box?

Thanks in advance!







Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX