This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread 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 Android Security Essentials Live Lessons this week in the Android 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
 
wood burning stoves
 
subject: Disabling ALT + ENTER in IE7 by using javascript.
 
Similar Threads
form validator to check for alphabets in a text field
writing to a file using javascript
URGENT Help needed on JavaScript.
jQuery not working on page
Check if an email-adress is valid with javascript