making onkeypress event work for all three browsers: IE, Firefox, Chrome.