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?
The code on that page seems a little broken. Specifically, it seems to use a
printfunction that’s absent from the latest jQuery (perhaps it’s included in that missingevents.jsscript?)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.)
In this changed version, I’m using jQuery’s
append()function to output the debugging messages into a newdivI’ve added below the text box. When you type into the text box, you should see the key press events being registered there.