Disabling the enter key

Advertisement
Hi, I have a jsf page that has an <h:inputText> fileld, and whenever I fill it and press enter the form gets submmited. I want to disable the enter key, so that if the user hits enter nothing will happen. This way the form will only be submmited by clicking a button with the mouse.
Thank you,
Komyg
Advertisement

Replay

You can use javascript to do this. The merits of using javascript can be saved for another time. Simply put 'javascript disable enter key' in a Google search and you will find what you need. Here is the link at the top of that list:
http://www.felgall.com/jstip43.htm
Good luck.

Is There a List of Keyboard Shortcuts for Adobe Digital Editions, I Found Two By Accident the "Arrow" Keys and the "Enter Key" for Turning Pages in an eBook...

Hi  ??  :       Does Anyone Know If There is a List of Keyboard Shortcuts for Adobe Digital Editions, I Found/Discovered Two By Accident the "Arrow" Keys and the "Enter Key" for Turning Pages in an eBook...   Thanks I Did Look for this

Customizing the "enter" key

Does anyone know how to reset the "enter" key (to the right of the right-hand "command" key) on the iBook G4 keyboard so that it functions as a second "control" key? I've heard that this is possible, but the Keyboard & Mo

How to press the enter key then execution Form?

Using:SAP B1 UI Form for C# How to press the enter key then execution Form? thanks Edited by: JackyChang on Jul 5, 2010 5:35 AMHi JackyChang, Use the SendKeys method. VB Sample oApplication.SendKeys("{ENTER}") Regards, Vítor VieiraRead other 3 a

How do I remove  the enter key on the numeric keypad as a command key?

How do I remove the enter key on the numeric keypad as a command key.  I want to use the enter key as a return key.Don't.  It will void the warranty.  Take is to an Apple store or an AASP and have them do it.Read other 2 answers

Hello, I purchased design premium 4.0 German Windows  (LIZ 390232 from 22.02.2010) from my friend and wanted to installation it. However, the key code does not work. He has the PC is no longer, so he can not  disable the product key. He loaded it, but onl

Hello, I purchased design premium 4.0 German Windows  (LIZ 390232 from 22.02.2010) from my friend and wanted to installation it. However, the key code does not work. He has the PC is no longer, so he can not  disable the product key. He loaded it, bu

Clearing the history causes the enter key and search button not to work

If I clear my history and set my browser to never remember or suggest websites, the search button doesn't work. I can click on it but nothing happens. In addition, if I simply use the enter key from my keyboard, that doesn't work either. I have to re

Suggestion needed: Where to catch the 'Enter' key

Hi, Could someone give me guidance. Below is the background and question of what I would like to do. (Note: There would be so much code I am hoping that someone can understand this without it but I will look later tonight at your possible responses t

U150 Numeric Keypad - Where is the Enter Key

If you enable the numeric keypad on the U150 keyboard, which key is the Enter key?  I need this for InDesign and other applications, where the Numeric Keypad Enter key has special meaning.I see now that it's context dependent. However, when entering

Pressing the ENTER key in first tab -- a button in another tab is pressed?

Hi guys,  I am facing a problem. I have a tab with 4 different tabs. When I am in the first tab, and trying to change a control's value by pressing the Enter key, it suddently switches to the seconds tab and presses a button there.  Any idea how that

I can't use the 'Enter' key to take me to a website I've typed into the nav bar - I have to use the mouse to click on the 'go' arrow. Why? How do I fix this?

I can't use the 'Enter' key to take me to a website I've typed into the nav bar - I have to use the mouse to click on the 'go' arrow. Why? How do I fix this?See: *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themesRead other 4 answer

How to fix the enter key not opening sites in the URL box?

Ever since the update to 10.0.1 pressing enter to open a site in the URL entry box doesn't work. Anyone know why? I have to click the arrow key to the side of the URL pannel, and enter key works as normally everywhere. It is INCREDIBLY annoying.Try d

I need to disable the delete key from going back a page.

My son is doing online homeschooling. If he is taking a quiz and accidentally hits the delete key to correct a word in his answer the page goes back and he is kicked out of the quiz. I need to disable this function in Safari to protect him from this.

How to disable the F4 Key Event?

Hi Guys, I have written my own FocusManager which allows me to traverse through disabled components. If a user presses the F4 key while the focus is in a disabled JComboBox, the popup becomes activated. Is there any way deactivate the F4 keystroke? I

Can I disable the shortcut keys on the tool bar?

I am running quick books online. When I try to use a short cut key for qb online (alt+s), the Foxfire History menu drops down. Can I disable the firefox short cut keys?Press the Shift key in addition to the shortcut keys and use Shift+Alt+S for the Q

Disable the alt key?

Hi everyone, As my name suggests, I am a student who is not a techie so please excuse me if I make any mistakes, and I would like to mention that any kind of re - coding would be useless because I am hopeless with computers. I recently had a friend c

Problem with disabling "ENTER" key in JTextArea

Hi, I have the following codes to disable the 'ENTER' key in the JTextArea, but it does not work. Does anyone know why? KeyStroke enterKey = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0); textarea.getKeymap().removeKeyStrokeBinding(enterKey); textarea

How can i select the next column instead of next row when press enter key

I need to know how can i select the next column instead of next row when i press the enter key.By default ,when i press enter key the next row is selected and the column remain unchanged but I wants opposite that is the row should remain unchanged bu

Enter Key is not being accepted properly in the Applet

We have developed a Telnet application which is in form of an Applet. We are facing some problems with respect to that. We are using Java 1.2. When login sessions are launched, the login prompt is displayed. After we enter the user id and press the "

Macbook internal keyboard  return/enter key disabled

Suddenly apropos of no software changes, the enter key has stopped functioning.  Is there a repair or am I going to have to buy a new upper case at $150 plus labor because one key has stopped working?  I have tried an external keyboard and the extern