case String.fromCharCode(13) ??
I am writing a small js app... I need to use Switch and case for to process a string (textarea).
I don't know why but I am unable to make the script recognize the "Enter key":
case String.fromCharCode(13) :
w = w+String.fromCharCode(13);
All other chars work fine es:
case String.fromCharCode(32) :
w = w+String.fromCharCode(32);
Only Enter is not working...
I understand but what's not working?
When i type some text in the textbox, all character are recognized but enter.
I type in my textbox:
i get back "Helloworld" enter is ignored. If i type "Hello world" i get "Hello world" the space is recognized.
I would like my app to work also when i press enter and not to ignore it.
I made a similar app with Flash and it works without problems.
are you sure it's 13? I thought it was, too, but it seems like in a text area it might be 10...
you need to describe the whole scenario, this doesn't help identify the cause. On top of that we will need to know if the behavior is consistent on all browsers.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)