Backspace, Del, Arrow keys, Tab not working in Firefox when applying validation

Hi,
I am developing a webpage with some textboxes requiring only alphabets or alphanumeric text to be accepted. I am using DevExpress controls and following is the javascript code that executes on keypress
function fn_allowAlphabetspace(s, e) {
var theEvent = e.htmlEvent || window.event;
var key = theEvent.keyCode || theEvent.which;
debugger;
key = String.fromCharCode(key);
var regex = /[a-zA-Z ]/;
if (!regex.test(key)) {
theEvent.returnValue = false;
if (theEvent.preventDefault)
theEvent.preventDefault();
All the browsers except firefox allow Backspace, Del, Tab, Arrow keys, Home, End key to work perfectly. Firefox does not allow any of these to work on the textboxes.
Thanks
Shitiz

Hi,
I tried to solve it by debugging the javascript and found the below code to be working for firefox as well as on other browsers IE10, Chrome and Safari without any issues
//validation function to allow only alphabets and space
function fn_allowAlphabetspace(s, e) {
var searchSpecial = '$Backspace$Del$Home$Tab$Left$Right$Up$Down$End$';
if (searchSpecial.indexOf('$' + e.htmlEvent.key + '$') < 0) {
var theEvent = e.htmlEvent || window.event;
var key = theEvent.keyCode || theEvent.which;
key = String.fromCharCode(key);
var regex = /[a-zA-Z ]/;
if (!regex.test(key)) {
theEvent.returnValue = false;
if (theEvent.preventDefault)
theEvent.preventDefault();
Please not that parameter '''''e''''' passed in the function provide the details of the keypress function. I am using DevExpress ASPxTextBoxes. Anybody who wants to use this function need to make changes in the above code as per the control used
Thanks
Shitiz

Similar Messages

  • My laptop right arrow key is not working

    my laptop right arrow key is not working.Please help me

    Hi @Akashandroid 
    Welcome to the HP Forums!
    It is a dynamite  place to find answers and  tips!
    For you to have the best experience in the HP forum I would like to direct your attention to the HP Forums Guide Learn How to Post and More
    I understand that your right arrow key is not working.
    Here is a link to HP Notebook PCs - Notebook Keyboard Troubleshooting (Windows 8).
    If this has not helped, it may be a mechanical issue and require replacement.  If you are in warranty please contact HP support for repair options.
    Please call our technical support at 800 474 6836. If you live outside the US/Canada Region, please click the link below to get a support number for your region.
    World Wide Phone Support
    If you are out of warranty you may wish to try the repair yourself or take it to a local repair shop.
    Here is a link to the HP Pavilion g7 Notebook PC Maintenance and Service Guide
    Chapter 3 page 20 has the keyboard part numbers if you should require them. 
    Chapter 4 page 58 has steps for removing the keyboard should you want them.
    Good Luck!
    Sparkles1
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom right to say “Thanks” for helping!

  • MacBook Pro up arrow key does not work how to fix it?

    When I am just working on the computer the up arrow key does not work at all but when I use bootcamp to go to the PC side the arrow works so i know its not a phisical problem, i have tryed everything i know and still no success.

    Hello brooklinekilla,
    I would be concerned too the up arrow key on my keyboard was not working.  I found an article that can assist with further isolating and troubleshooting issues with the built in keyboard.  I recommend following the steps under the section titled, "Some keys don't work as expected" in the following article:
    One or more keys on the keyboard do not respond
    http://support.apple.com/kb/ts1381
    Thank you for posting in the Apple Support Communities.
    Best,
    Sheila M.

  • My arrow keys are not working inside flash games

    Hello,
    Whenever I play any flash game, my arrow keys are not working. They work perfectly fine when I am scrolling the site with them, but not in flash games.
    I am using Google Chrome, flash player version 10,3,181,36 and my operating system is Win7 64 bit.
    Solutions I've already tried:
    Use another webbrowser
    Re-install Flash player
    Restart PC
    Try another keyboard
    I have this problem ever since the last Flash Player update.

    Hey there Questionair1.
    It sounds like your arrow keys are not working correctly. I would start with these steps from the following article named:
    OS X Mavericks: If keys on your keyboard don’t work
    http://support.apple.com/kb/PH13809
    You may have accidentally set an option that changes how your keyboard operates.
    Choose Apple menu > System Preferences, click Dictation & Speech, then click “Text to Speech.” If “Speak selected text when the key is pressed” is selected, deselect it or click Change Key to select another key.
    Choose Apple menu > System Preferences, click Accessibility, then click Keyboard. Make sure Slow Keys is turned off. If Slow Keys is on, you must hold down a key longer than usual before it’s recognized.
    Thank you for using Apple Support Communities.
    All the best,
    Sterling

  • Solved My left and right arrow keys are not working

    I just installed gnome (been using kdemod) and now, while in gnome, my left and right arrow keys are not working. Please help me solve this. I am not using compiz.
    Last edited by patrickaupperle (2009-03-25 11:19:04)

    Hi!
    I had that problem with Debian and later Arch, after I messed something up (never found out what). There was a chaotic but easy cure though (I've got no idea, why it did that on 3 different installations the exact same way - might be a logitech-keyboard issue or something... me-as-user-related)?:
    - do all keyboard changes needed in xorg.conf NOW, had to repeat "strange steps" after each change.
    - add new keyboard layout (no changes to default) in gnome keyboard settings
    - delete old keyboard layout
    - browse trough the keyboard layout "previews" of the newly added layout until it crashes (this step might be optional *g*)
    - restart gnome, add "new new" layout, delete "new old" keyboard layout, and set the "new new" layout right (try evdev-manages first, then switch to youkeyboard/yourlocal if that didn't do it).
    good look!

  • Left and right arrow keys are not working properly now

    I searched the forum and didn't see this posted. My left and right arrow keys are not working properly now.
    For example, when typing, left arrow does not produce the desired action (move cursor one spot to the left), and right arrow does not produce the desired action (move cursor one spot to the right). Also, control + left no longer activates spaces, and control + right no longer activates spaces.
    Interestingly, in investigating the problem, I noticed that my shortcut keys for activating spaces and for activating expose had been changed (software update?). Before, I had set F5 (without pressing fn) for expose and had set F6 (without pressing fn) for spaces. Now, I noticed spaces was set back to the default of F8 (requiring fn).
    The issue persists after shut down, and even when logged on to other users, e.g. Guest.
    All other keys seem to be working fine, including the up and down arrows.
    I don't think it's a cleaning issue because fn + left + right produces the "[" character on the screen.
    Any ideas?

    I'm having the same type of issue on my MacBook except not with arrow keys. The volume keys do different things when I click on them. For example, the mute key brings up the dashboard and the volume up key makes all the open screens smaller (don't know what this feature is called). I did a software update then restarted the computer when this starting happening. Any help would be greatly appreciated, thanks.

  • My down arrow key does not work as it should

    Hello to you.
    My down arrow key does not work as it should.
    When I use my down arrow key is the whole side going down.
    It is annoying when you write that you always end up bottom of the page when using the Down arrow key. I hope I can help me
    I use Windows Vista.
    Yours faithfully
    Anders Lodberg

    Check if you enabled scroll lock (fn + insert), in excel it scrolls page when enabled and move across cells when disabled
    3000 N200 0769-AL3, Intel C2D 2G T5750, IEL10 mb, Kingston 4G RAM, Samsung 320G HD, Broadcom lan 100, Agere modem 56k, Broadcom wifi g, AuthenTec fingerprint reader, Sonix 1.3M camera, LG DVD burner, Samsung 15,4" 1280x800 BrightView, Intel X3100 IGD 384M, Ricoh 5in1, Ricoh 1394, vista home premium sp2

  • The enter key is not working in firefox but it has working fine in chrome and IE so please help me to rid out from this.

    The enter key is not working in firefox but it has working fine in chrome and IE so please help me to rid out from this.

    Hello gokulaan, '''try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * You can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
    Thank you.

  • Spacebar,Enter,Delete,up and down Arrow keys are not working...

    Hello Everyone,
    My Hp Laptop has gone through a serious problem. Its Spacebar,Enter,Delete,up and down Arrow keys have stopped working . I am not sure how this problem caused . So i gone  through varios fixes, that were -
    1. Rstoring to an earliar date.
    2. Re-installling Keyboard driver
    3. Formating the System.
    The third fix Formating helped me and my keys started working . After some day I installed a software HP Network Manager but this after installing it again those keys stopped working and also the LED lights on Caps Lock and Wi- fi are not turning on but these two are functioning normally.
    the some of the information related my HP laptop are-
    Model: Pavilion G6
    ram 4 gb.
    OS: Windows 7 Home Basic
    can anyone please suggest me is it a hardware related problem or some software/driver  related ? And also what next i do to fix this serious issue...
    Thanks in Advance.
    This question was solved.
    View Solution.

    Hi Alien004,
    You and Advance23 have pretty much covered everything at this point and I believe that it is a hardware issue. I would advise that you contact HP regarding a possible repair. You can reach HP Total Care at 1-800-474-6836 in North America or start here outside of North America.
    Please click “Accept as Solution ” if you feel my post solved your issue.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Thank you,
    BHK6
    I work on behalf of HP

  • Arrow keys suddenly not working!

    Two arrow keys, right and up, suddenly stopped working on my black Macbook.  I had this problem a week ago, then upgraded from Snow Leopard to Lion and they worked again.   Not now. They won't work with modifying keys either!  Someone please help me.

    If a number of keys are not working, it is probably a defective keyboard. Having a different keyboard setting would cause different characters to show up, not not work. You are going to need to get the keyboard replaced. If the computer is still under warranty, do it as soon as possible. But if they find a spill on the keyboard, expect to be charged. In the meantime, an external USB keyboard does work well on these Toshibas.

  • My left and right arrow keys are not working

    I am having problems with my left and right arrow keys no longer working. I have tried restarting, running Mac hardware check, and nothing has come up. I haven't spilled anything on it, so I don't know why they have stopped working.

    Sorry I didn't get to this thread sooner. From your posts it actually sounds like you may have a defective keyboard. Going to the nearest Apple store for assistance is a good idea. Be sure to [make an appointment|http://www.apple.com/retail] first or you may have to wait a long time to talk to a Mac Genius.
    Best of luck.

  • Up and down arrow keys are not working properly when using SQL CLI on Linux

    Every time I hit up, down, left, and right arrow keys to return to a previous sql command I got ^[[D, please any hints to fix this issue?
    The backspace works fine with me. I tried to use stty to fix this issue with no luck.
    Thanks
    Mohamed                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Which SQL client and Linux version are we talking about?
    Assuming you are using the Oracle sqlplus client... it does not support command line editing and history using the arrow keys. For this to work you will have to install a product called Readline Wrapper. See my answer at the General Database forum:
    sqlplus command line editing

  • Up and down arrow keys do not work

    Hi Guys...I need your help...
    Since my arrow keys (only up and down) do not work anymore on my iMac (Mac OS X 10.4.11)...No matter in which application...
    I have reset the PRAM since I thought that this may solve the problem without any success...does anyone have an idea how to resolve this problem?
    Have I maybe pressed any shortcut by mistake, which can lock these keys?? It is a pain to work without these 2 keys
    Thanks in advance for the help

    You may have switched on [http://kb.mozillazine.org/accessibility.browsewithcaret caret browsing].
    You can press press F7 (on Mac: fn + F7) to toggle caret browsing on/off.
    See http://kb.mozillazine.org/Scrolling_with_arrow_keys_no_longer_works
    * Tools > Options > Advanced : General: Accessibility: [ ] "Always use the cursor keys to navigate within pages"

  • Arrow key scrolling not working with advanced search- Adobe Reader X

    I'm using adobe reader X and when I get results from an advanced search I am scrolling down the search results with the arrow keys, but the document will not update. I know this will work. Can anybody please help?

    I am also having this problem.  Previous installations of Acrobat X allowed me to use the up and down arrows to navigate the search results, but no longer loads the appropriate page in the document.  I have to click each entry or hit the enter key after using the down arrows to update the page.

  • Move to previous or next magnified photo     Press Left Arrow and Right Arrow keys does not work

    Move to previous or next magnified photo
    Press Left Arrow and Right Arrow keys
    This command no longer works in iPhoto. The photo just bounces for a moment, then all the photos begin scrolling. I used to be able to just hit the key to scroll one at a time.

    What version of iPhoto and system are you running?  What mode are you in, edit, full view, full screen, ???
    OT

Maybe you are looking for

  • Transfer Data from Oracle to EXCEL

    Hello, I would like to transfer data from an oracle table into an EXCEL-Spreadsheet - while doing it, I got the error message "-1002 : 37000 : java.sql.SQLException:[Microsoft][ODBC Excel Driver]'C$_0Output is not a valid name..." I think I have corr

  • Advantages Of XML Type Views

    Hi Every one, I am pretty new to XML Type views, and just want to ask few questions to every one. May be they do or don't belong here.. but help me out... 1. What are the advantages of XML Type Views? 2. Why should I prefer to use XML Type Views? (Is

  • Running H/F to read Header from Previous Page?

    Hopefully someone has figured this one out and can share the solution with me. I'm using Framemaker 7.1 I have a Heading (Call it HeadingX) with body text below it. That body text carries over to the next page. On that same carry over page I also hav

  • Business Unit Analyst

    Can we have a configureation document for +Business Package for Business Unit Analyst+ Regards, Sujana

  • Creating HTML in servelet using binary HttpServletResponse.setContentType

    I have a servlet creating dynamic gif images. It works great. Now I need to add some HTML down at the bottom. I currently have setContentType at "image/gif". How do I get the text/html to appear after the image? Currently the text output is ignored.