• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disabling ALT + ENTER in IE7 by using javascript.

 
Rashmi Umre
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not agree what you are doing but here are hints

things missing

(event)

event = event || window.event

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic