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

  • Home
  • SEARCH
  • 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 6549389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:05:14+00:00 2026-05-25T12:05:14+00:00

I am trying to use the keyup function in a little search I made,

  • 0

I am trying to use the keyup function in a little search I made, but with the files on the server and accessing the page through IE8 and FF, the keyup function doesn’t seem to work. To test it I borrowed the code from the jQuery websites example put it on the server (it’s Windows Server 2003 R2). However, this example also isn’t working(http://api.jquery.com/keyup/). I noticed it has the line

<script type="text/javascript" src="/scripts/events.js"></script>

and my initial thought was, “mine isn’t working because I’m missing this events file!” but after googling I’m thinking this isn’t the case. In my code I’m linking to a downloaded copy of jQuery, and I’ve also tried linking it through the googleapi’s copy, no luck either time. Any thoughts about why the keyup function might not be working on the server?

  • 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-05-25T12:05:15+00:00Added an answer on May 25, 2026 at 12:05 pm

    The code on that page seems a little broken. Specifically, it seems to use a print function that’s absent from the latest jQuery (perhaps it’s included in that missing events.js script?)

    I’ve made some small changes to make a working version (note I’m using the Google-hosted jQuery; you can point that at your local version instead and it should still work fine.)

    <!DOCTYPE html>
    <html>
    <head>
      <style>
    fieldset { margin-bottom: 1em; }
    input { display: block; margin-bottom: .25em; }
    #print-output {
      width: 100%;
    }
    .print-output-line {
      white-space: pre;
      padding: 5px;
      font-family: monaco, monospace;
      font-size: .7em;
    }
    
    </style>
      <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script>
    </head>
    <body>
      <form>
      <fieldset>
        <label for="target">Type Something:</label>
        <input id="target" type="text" />
      </fieldset>
    </form>
    <button id="other">
      Trigger the handler
    </button>
    <div id="output"></div>
    <script>
    var xTriggered = 0;
    $('#target').keyup(function(event) {
      if (event.keyCode == '13') {
         event.preventDefault();
       }
       xTriggered++;
       var msg = 'Handler for .keyup() called ' + xTriggered + ' time(s).<br />';
       $('#output').append(msg);
    });
    
    $('#other').click(function() {
      $('#target').keyup();
    });</script>
    
    </body>
    </html>
    

    In this changed version, I’m using jQuery’s append() function to output the debugging messages into a new div I’ve added below the text box. When you type into the text box, you should see the key press events being registered there.

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

Sidebar

Related Questions

I'm trying to get json code from page.I use this private function __ajax_admin_search($username =
I'm trying use self-signed certificate (c#): X509Certificate2 cert = new X509Certificate2( Server.MapPath(~/App_Data/myhost.pfx), pass); on
Trying to use a guid as a resource id in a rest url but
I have been trying use the edit_post_link() function to contain an image. All of
I'm a little confused here, I am trying use a partial view in a
I am trying use filehelpers class builder but I am kinda confused on what
I am trying use a javascript function while passing php variables in it. For
I'm trying to fire a function when the keyup event happens. This works fine
I am trying use std::copy to copy from two different iterator. But during course
I am trying use the new server side plug-in feature for TFS 2010. (I

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.