Jump to content
3 replies to this topic
Posted 28 July 2012 - 02:58 PM
Okay, I have been away from this book for a couple of months and now I am getting back to working through the examples in chapter one again. I was going over the Guess the letter example and I know this was working before but now when I run it, I get just numbers when I press any letter and the message in the middle of the screen always says This is not a number. ?????? Did the browsers change support for the key pressed events while I wasn't looking? I am using the downloaded code to check mine and nothing is incorrect in the code and I have run this in Chrome, Firefox, Safari, and Opera all current versions.
I know this was working in Firefox back in April. What could be the problem?
Posted 25 November 2012 - 05:15 PM
Doesn't someone know the answer to this question?
Posted 25 November 2012 - 05:50 PM
Okay, after much research I found that setting the event listener to keypress instead of keyup in the initGame() function, made the Guess The Letter app work for me. It shows the correct keys and only states Not a Letter when you press non letter keys.
It works in latest versions of Chrome, Safari, and Opera, however, it does not work in FF.
I have submitted an errata for this on the book page.
Edited by jnbutler1815, 25 November 2012 - 05:51 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users