Thank you Logician. Does the job! (In both browsers.)
TS.
User Profile
Collapse
-
Thanks Clint,
works in IE but still not in Firefox!
I wonder if the problem lies in intercepting the keycode and sending on the new keycode (or charcode). I have also tried 'onkeyup' and 'onkeydown' but these stop the function working in IE.
Your code suggestion was:
...Code:<html> <head> <title>space-plus</title> <script type="text/javascript"> <!-- function
Leave a comment:
-
Replace a character in an input box - onkeypress - FF problem
Hi,
I have the following code which works fine in IE but does not in Firefox:
...Code:<html> <head> <title>space-plus</title> <script type="text/javascript"> <!-- function alpha(e) { if(e.keyCode==32) {return (e.keyCode=43);} } // --> </script> </head> <body> <form> <input type="text" onkeypress="returnLast edited by acoder; Jan 19 '13, 09:53 PM.
No activity results to display
Show More
Leave a comment: