Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8646325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:46:42+00:00 2026-06-12T12:46:42+00:00

Hi we are facing the problem with escape key in our web application. If

  • 0

Hi we are facing the problem with escape key in our web application. If user press the escape key the web application gets stop loading.
I tried using all these with(onkeydown and onkeyup)

document.attachEvent("onkeydown", win_onkeydown_handler);
window.attachEvent("onkeydown", win_onkeydown_handler);
window.document.attachEvent("onkeydown", win_onkeydown_handler);

I cant able detect the escape(KeyCode=27) in my web application .. but i am able to detect refresh,f5 and all other keys

Note: i face this problem in IE

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T12:46:43+00:00Added an answer on June 12, 2026 at 12:46 pm

    This helps me to prevent escape in iframe

    function disableEscapeAndRefresh(){
    try{
        if(window.frames && window.frames[0]){
            window.frames[0].focus();
            for (var i_tem = 0; i_tem < window.frames.length; i_tem++){
                if(document.all && document.body.filters)
                    window.frames[i_tem].document.onkeydown = new Function("var e=window.frames["+i_tem+"].event; if(e.keyCode==116){e.keyCode=0;alert('Refresh Not Allowed');return false;}if(e.keyCode==27){e.keyCode=0;alert('Escape Not Allowed');return false;};");
            }
        }
    }catch(e){
    
    }
    }
    

    call this method in iframe onload

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am facing problem with UIPanGestureRecognizer. suppose i am adding 10 button dynamicaly using
I am facing a problem in my application. I have some section in application
I'm facing problem when migrate my web app project from development server to live
I have facing problem to access xmlrpc. Whenever I tried to access xmlrpc through
I'm facing an odd problem.... $string is user input $log = serialize(array('string' => $string);
I am facing problem in getting Facebook data I am using Facebook SDK for
I am facing problem while connecting cake php version-2.0.0-dev application on server. When I
I'm facing problem in putting cross button on top of the textview. I'm using
I am facing problem with debugging my 64 bit application thru a project of
hi i am facing problem in loading css file. <?php //if ( ! defined(BASEPATH))

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.