Supress the enter key in JavaScript

Hello,
If I enter a in the textbox and hit on enter key without coming out of the that textbox ( not by hitting submit button page ), the execution goes to JavaScript method and start validating mandatory fields in the page .
I supress the enter key: but expecting a better solution
<input name="histYr" class="formtext" type="text" maxlength="6" size="6" onKeyPress="if (window.event.keyCode == 13) return false;"/>Please any body have some better idea to handel.
Thanks

I supress the enter key: but expecting a better
solutionThe code you have posted is the only way I know for suppressing keystrokes. But be aware that window.event.keyCode doesn't work with NetScape... and JavaScript is NOT Java.

Similar Messages

  • Disabling the enter key

    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

    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.

  • Button that always works when Unde the Enter key to record the information?

    Hello everyone,
    How do Oracle Express, a button that always works when Unde the Enter key to record the information
    and every time I write some information that the cursor is placed back into the Text Field item only on my screen
    order to optimize this process
    I appreciate your cooperation and attention ...
    good day ...
    Reynel Martinez Salazar

    Hi,
    First, you should change your text item to a "Text Field (Always submits page when Enter press)" item. This adds a call to the submitEnter() javascript function which will submit the page when you press Enter while in the text field.
    Second, on your page, edit the Page definition. In there is a setting called "Cursor Focus" - set this to "First Item on Page". When the page is loaded, this will put the cursor into the text field.
    Andy

  • How to refresh changed data in a plannable template with the Enter Key

    Hi,
    The situation I face is as follows.
    Integrated Planning is being implemented as a tool for budgeting. The user changes a value in a plannable cell on the portal and wishes to see the new updated data by pressing ENTER. Currently we have provided a REFRESH button so that the user gets the desired result.
    Is it possible to see the updated value by pressing ' ENTER' and if so , whats the way around to do it.
    thanks in advance.
    Jaya

    Hey guys,
    I'm interested too in this solution. In BPS there is an additional function described in the HowTo Paper HowTo run planning functions on save and other events
    Now I'm looking for this possibility in IP as well in excel-based IP and web-based IP. For example a copy function should be executed automatically when pushing the enter key.
    Thanks a lot!
    Clemens

  • Since upgrading to Firefox 10.0.2 my AVG extension has had to be disabled, as after typing in any web address in the address bar, the enter key had no effect and I could not go to the site without pressing the Reload arrow on right.

    I have recently upgraded Firefox to the latest version 10.0.2. After that I could not enter any website address and press the enter key and get to the website, nor could I select a website from the dropdown list of previously visited websites. The only way I could get there was by pressing the arrow on the right side of the address box (Reload current page). Once I disabled the AVG extension, everything worked normally. As soon as I enabled the AVG extension, it stopped working again.

    Follow these steps for the controls to work:
    # Start > Programs > Mozilla Firefox > Mozilla Firefox
    # Find the “Tools” menu at the top of the browser window and select “Add-ons”.
    # Click on the “Extensions” icon to make sure you’re in the correct option menu.
    # Locate “AVG Safe Search” and click on the containing line to highlight and select the add-on.
    # Click the “Disable” button and close the Add-ons window.
    # Close down any Firefox windows you may have open.
    # That’s It – You’re Done!

  • How can I prevent forms from being prematurely submitted when users click on the  "Enter" key?

    Is there any way that I can prevent Dreamweaver CF submission forms from being prematurely submitted by the user when he/she clicks on the "Enter" key before they have completed the form?  I need the users to finish form and click on the "Submit" key.  I have the "Submit" key action configured as "submit form"

    Thank you!
    Found a solution through Google.

  • How can I remove the "enter" key from the keyboard? (New Macbook)

    I have the last white macbook, I spilled beer in a couple of keys, I managed to removed them without problems, but I can't find the way to remove the Enter Key, and there is no help on internet Anyone?

    What characters are you talking about exactly and why would you want to remove any?
    There is really no way to modify Apple's keyboards or add your own in iOS, but there are some apps that may provide a work around.

  • After 2/5/2012 update to 10.0, the enter key no longer functions on the URL bar. (Running Windows 7 Home Premium on 64 bit Intel Core i3)

    The URL line accepts text, but using the "Enter" key generates no response. The right arrow at the end of the URL line will take me to the URL.

    https://support.mozilla.org/en-US/questions/917446
    thank you

  • The enter key to login pages no longer works in Firefox 5

    After upgrading to Firefox 5 hitting the enter key after entering my password on login page does nothing. Before it would submit the page. This was a problem with the beta, too, and I had to downgrade to 4 to fix it. That works fine in 4.

    Yes, this is a stupid behaviour. I have it too. Also, in textboxes it doesn't give me new line.
    The form sending you can solve via hitting Ctrl + Enter.

  • When I type an address in the location bar and hit Enter nothing happens. I must click the arrow button at the end of the location bar. How do I fix it so that the Enter key works?

    When I type a web address in the location bar and hit enter nothing happens. In order to go to the website I've typed in, I must click the arrow button at the end of the location bar. How do I make it so that hitting the enter key takes me to the web page.
    == This happened ==
    Every time Firefox opened
    == Since Firefox 4 Beta installed an update

    The AVG addon seems to have caused the problem for me. I had it disabled and everything worked. Then I updated to AVG 2011 and the problem occurred. It seems to have reenabled itself after the update.
    Just disabling it solved the problem.

  • 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.

  • Why isn't the enter key working in InDesign?

    I have installed Adobe InDesign CS6 as creative cloud but pressing the enter key on the numbers keypad doesn't move my text to the next page as it should but just drops it to the next line. What can I do to resolve this?

    Windows Laptop? Some of them have both the enter keys mapped together, and changing the state of the Numlock will swap between functions. If that's you, edit the shortcuts so bothEnter keys are a paragraph break, and make a new shortcut for page break (Numpad enter is actually a column break, by default).

  • Unexpected behaviour upon pressing the 'Enter' key on dialog screen

    Hi.
    I have two dialog screens that exhibit unexpected behaviour when i pressed the 'Enter' key.
    Screen 1: When I pressed the 'Enter' key, the focus shifted to another input field and the content of the previous input field is cleared. The thing is, I did not have any codes in PAI for 'Enter'. Why is this happening?
    Screen 2: On load, some of the fields on this screen will be disabled. However, when I pressed the 'Enter' key, all the disabled fields become enabled. Again, I did not have any codes that handle the 'Enter' key in PAI. Why is this happening?
    Any help is appreciated.

    Hi Atish.
    Yes, I have used CHAIN... END CHAIN.
    I thought that CHAIN... END CHAIN allows my input fields to be re-activated after an error message is displayed.
    How would CHAIN... END CHAIN cause the unexpected behaviour?
    Thanks.

  • Create record by the enter key

    I have a form with 10 items. Looks like this
    P16_ID hidden
    P16_Created_on Date Picker
    P16_Order_No Text Field
    P16_Origin Display as Text(saves state)
    P16_Destination Display as Text(saves state)
    P16_Bill_To_Location Display as Text(save state)
    P16_Rate Text Field
    P16_Code Select List
    P16_Carrier Select List
    P16_Weight Text Field(always submits page when enter pressed)
    I want the people to be able to key in the information and after the weight hit enter and it submits the page. Then it allows you to key in your next loads then when you get to weight hit enter again and so on. I do not want to have to use the create button because that takes longer to key the information in when you have to take your hands off of the keyboard and click create. The problem I keep getting is a branching error and the always submit page when enter pressed don't seem to work. I have version 1.6. Please help

    I believe that APEX submits a page when the enter key is press by default. However, I noticed that when you have a hidden field present in the form you get the branching error message. .
    If you change your hidden fields to regular text fields, this will take care of the problem. Of course, this may not be the best on your form, showing your ID on a regular text field.
    I am not sure if APEX developers intended to have it like this or if this is a bug.
    I hope this helps.

  • Using the enter key on an editable table

    Hi,
    I'm using 11g adf and I can't figure out how to get past this:
    When going through an editable table (with editingMode="editAll") using the enter key, it will stop after a certain number of rows, equal to the value of fetchSize. If I want to go down further, I have to scroll down another way to make it fetch the next set of rows, it won't go to the next row with the enter key. It simply won't execute the query to fetch the next rows.
    Increasing the fetchSize will just delay the problem to a row further down (and decrease the performance since the fetch operation can take quite a bit longer).
    I've tried to put a clientListener on both the table or the inputText fields to intercept the enter key, but that won't work when the table is in editable mode.
    Is there any way to fix this problem?

    Hi,
    I've tried to put a clientListener on both the table or the inputText fields to intercept the enter key, but that won't work when the table is in editable mode.
    The clientListener needs to be on the inputText fields. Then in JS you need to call a server listener which will check if the current row is already at the range end and if calls NextSet (you can provide this as a method binding). Unfortunately after this you will need to PPR the table to show the new rows. This is how I would try it.
    Frank

Maybe you are looking for

  • Safari 5.1.2 hates PDF!

    My old Safari loved PDF documents. When I clicked on a pdf link - I could see it in Safari without any trouble or issue. Now with the new update - Safari 5.1.2 - the monitor just go dark when I click on a pdf link. And Safari will not aloud me to sav

  • Handling Transport ack. in Abap Proxy to JDBC Scanario

    HI all I have a scanario  where i have message which is being sent from an abap proxy to a SQL Server database using JDBC adapter. The scenario involves a BPM.While sending the message the message shows delivered in MDT (Message monitor for Adapter 

  • Searching PDF's with Sharepoint and Adobe's iFilter (Reader 9 install bug?)

    Hi, The suggested way to get the latest iFilter for PDF's is to install the latest Adobe Reader version 9. However I think that there is a bug in the install process -anyone agree? The Adobe web site says that the iFilter that comes with Reader versi

  • 802.11n: How to connect using this feature?

    I am new to Mac and was wondering if anyone can detail or point me to where I can find information on how to use or turn on the 802.11n feature. Thank you in advance for your time.

  • How many external Firewire drives can I share at once?

    I have several external hard drives connected to my server. I appears that I can only share 4 of them at a time. I work in a high volume photography environment and store about 2TB every three months. I need to be able to share multiple external hard