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 8793799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:10:08+00:00 2026-06-13T23:10:08+00:00

I am using $(document).keydown(function (event) { alert(event.keyCode); }); This function works great when the

  • 0

I am using

$(document).keydown(function (event) {
  alert(event.keyCode);
});

This function works great when the page is loaded..Now when i click on any part of the page and then when i press any key this event is not firing and alert does not come..

Why?

  • 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-13T23:10:09+00:00Added an answer on June 13, 2026 at 11:10 pm

    jsfiddle.net/5cyqC/3 click here and then click on Server Error oe anywhere else… and then see

    You are setting the focus to the content of an iframe.

    This is a separate document and events do not bubble out of it into the parent document.

    If you want to capture events from it, you will need to bind the event handlers to the document loaded in the frame.

    The Same Origin Policy will apply.

    See this question for questions about communicating across iframes when the same origin policy blocks normal communication.

    Note that there is no way to work around it from only one side as this would be a major security flaw. (For example, someone could put a banking website in a frame and then listen for keypress events in the bank’s form to steal passwords.)

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

Sidebar

Related Questions

I am using something like this: jQuery(document).keydown(function(e){ // code } For switching photos in
I am using this code the create an onshow event: (function($){ $.fn.extend({ onShow: function(callback,
I'm using the following code to detect users' key pressing, in JavaScript: $(document).bind('keydown', function
How to scroll two list separately using jquery keydown function? $(document.keydown(function(e1) { // ul
I am trying to remove the keydown event that I have created using the
how to reset the keydown function using jquery? For example, I two ul list
By using document.referrer we will get all the reference of URL in JavaScript, such
when using document's id as the only criteria in my query what's the difference
I am using document.getItemValueString(INetSendTo) to get the mail address of recipient exact mail address.
I have a variable when i write its value using document.write() i don't get

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.