This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes HTML, CSS and JavaScript and the fly likes Disabling ALT + ENTER in IE7 by using javascript. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Disabling ALT + ENTER in IE7 by using javascript." Watch "Disabling ALT + ENTER in IE7 by using javascript." New topic
Author

Disabling ALT + ENTER in IE7 by using javascript.

Rashmi Umre
Greenhorn

Joined: Jul 20, 2006
Posts: 17
ALT+ENTER in IE7 takes into window where address bar has been open. I am facing problem if I have popup open without any address bar to display some information and if I clicked ALT + ENTER then same popup opens with address bar. I would like to disable ALT+ENTER functionality with IE7 but I am not able to. Please find below code which I used to do it.

I am able to capture ALT+ENTER event but I am not able to restrict to open with address bar. Could you suggest any solution for the same.

<script>
document.onkeydown = keydowncheck;

function keydowncheck(){
var bAltKey = (event.altKey)? true : false;

var intKeyCode = event.keyCode;
//alert(intKeyCode );

if (bAltKey && intKeyCode==13) {


alert("Alt Enter has entered : " );

return false;
}

return true;
}
</script>
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I do not agree what you are doing but here are hints

things missing

(event)

event = event || window.event

Eric
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Disabling ALT + ENTER in IE7 by using javascript.