Turn off the text field (always submits page when you press enter)

I have an area which allows you to enter search criteria. There are two fields and a button. The 1st field is a selection list that gives a list of columns in a database that can be searched on. The 2nd field is where the user enters the value to search for. The user can submit the search in 2 ways. They can press the button or press return when the cursor is in the 2nd item that is a text field (always submits page when you press enter). The results are then displayed in a region of report below.

The problem I have, is that if the request is for > 10 seconds and the user gets impatient and hits the Enter key or the button search again the query is returned for a second time (or third or fourth according to the impatience of the user) causing the claim on the basis of data with a negative impact on the performance of the system.

I know how to handle the search key. On a click event on I turn off the button so that the user cannot click on it again and resubmit the request.

My question is - how can I turn off "always provides a page when you press enter" text item when the user presses enter? I tried an onclick event, but disabled the front element I could type in anything. Onblur event does not seem to do anything.

Any ideas would be very appreciated.

Andy

Hello

First of all, one thing to try: attributes of the Page, there is a section for the presentation in double - try setting this option on no.

Otherwise, using the text field type, adds the following to the INPUT tag:

onkeypress="return submitEnter(this,event)"

which means, you can call your own function of javascript on the onkeypress event, the final line would be call submitEnter(). But you can set the value of a hidden page element:

function doEnter(t, e)
{
 if ($x('P1_SEARCH_RUNNING').value == 0)
 {
  $x('P1_SEARCH_RUNNING').value = 1;
  return submitEnter(t, e);
 }
 else
 {
  return false;
 }
}

Then, after changing your element to an element of normal text on the attributes of HTML form elements, add in:

onkeypress="return doEnter(this,event)"

Andy

Tags: Database

Similar Questions

  • Text field (always submits page when you press enter)

    Hello

    I have two elements (username and password) and two buttons (Submit & cancel) when the user enters the correct DB table entry values and strike button SUBMIT with the < /b > < b > mouse it is able to go to the next internal page does not, up to here everything works absolutely perfect.

    But now, instead of clicking the button "SUBMIT" with the mouse, I want the user to use the functionality of the ENTER key on the keyboard and so I apply the two elements (username and password) as < b > text field (always submits page when you press enter) < /b > and < b > password (submits when you press enter) < /b > respectively.

    Also created a conditional branch and an unconditional branch (with the highest sequence number) by the research of the below thread: -.

    Re: Text field Element submits page when you press ENTER

    but still did not find any success, when I run the page with the correct details in the elements and press button nothing works the same page returns back to me with these two elements as empty?

    any help?


    thxs


    Kind regards
    Kumar

    Hello

    OK - two things...

    First of all, your branch to page 9 was conditional on the SUBMIT button

    Second, you had the condition that "request = Expression 1" where it should be "EXISTS.."

    I removed the button state and changed the condition type. Try it now

    Andy

  • Text field element submits the page when you press ENTER

    My page has
    -a 'text field' point
    -a 'Send' button (and a related branch, which works correctly).

    Management is working properly, when I hear some data for field text Item.
    and I press the submit button.

    I would like to the text field do the same action,
    When I press ENTER,
    After completing a few data for the text field.

    Currently, this does not work, and I get the following message:

    "ERR-1777: Page 121 provided no page at junction."
    Report this error to the administrator of your application.
    Restart the Application.

    I also tried the "(always present when the page Enter Presseds) text field" setting
    for the parameter "display as" Item.

    You can try my page at:
    http://Apex.Oracle.com/pls/OTN/f?p=9218:121

    Thank you very much
    Marios

    PS

    Make sure that the unconditional branch has a sequence number greater than all other branches - Apex will use the first part, that it can find which corresponds to the current situation. I tend to use 999 for the sequence numbers of the unconditional branches.

    Andy

  • Text field of point (always submits the page when you press enter)

    I do apply in which I could read codes bar by the optical drive, for which I use a field of text element, which shows me the barcode information, and then I click the button Save, which is a successful process...

    But when the property changes of text field for the point (still stands when enter press pages) for automatic recording, the process is not successful.

    -That can be done to the code system reading barcode automatically saves...

    Note: when reading of the bar code, including the son of enter...


    I appreciate your attention.

    Lucien Reynel Salazar Martínez... +

    Make sure that your process page is not conditional on the 'Record' button that is clicked.

  • How to turn off the chat window that loads automatically when you browse

    All because I installed firefox when a new page will load when browsing the internet, I get a 4 "square box white cat that appears in the lower right. I tried to disable my chat on all programs, and this does not resolve the issue. I never have this issue when you use chrome or internet explore. I design websites and like firefox the best to check my pages after editing. I prefer to make my default browser from firefox and chrome to delete, but this opening of the box is very annoying.
    Thank you
    Tad Fitzgerald

    Do you have the source address for your Firefox in your download history? There are a few unofficial beams that may contain unwanted options.

    To find the cause of the page changes, I recommend that you check the page modules. Either:

    • CTRL + SHIFT + a
    • Firefox orange (or the Tools menu) button > Add ons

    In the left column, click Extensions. Disable all non-essential or unrecognized extensions.

    Typically, a link will appear above at least an extension disabled to restart Firefox. You can complete your work on the tab and click one of the links in the last step.

    That get rid of the box?

  • Cursor autour breaks and clicks in the Middle words or a page, when you type, selects areas of the document when writing and by typing the following key, all this goes away.

    I have Microsoft Windows Vista Home premium, Version 6.0 (Build 6002: Service Pack 2), was Norton Internet Security. Cursor autour breaks and clicks in the Middle words or a page, when you type, selects areas of the document when writing and by typing the following key, all this goes away. Perhaps because of my attempts to resolve this issue, some of my PC system has had problems, it became unstable, I've had several accidents that I got Norton 360, but it don't did me not the solution and stops working, I re installed Norton Internet Security. Please give some answers and advice on how to solve this problem, thank you.

    Hello

    You use a desktop or laptop computer?

    Is the mouse a mouse wired or wireless?

    What is the brand and model of the computer and the mouse?

    If you are using a laptop, I suggest to change the sensitivity of the mouse pad.

    If this is a wireless mouse it might be interference from another close to the mouse. Make sure that speech recognition is not enabled.

  • Cursor move to the field next when you press enter/return

    Is there a way to make the curson go to the next field when you click Enter / return as it does when you press the tab key? Currently he entered just the info in the current field and does not advance to the next field with I button back.

    You can with JavaScript, but you have to use in the event of strike or Format a field, which is (normally) not available for all types of fields (checkboxes, for example). For text fields, you can use the following in the Format event JavaScript code:

    Fragment of script format for the text field

    If (event.commitKey = 2) {}

    getField("Text2").setFocus ();

    }

    Replace "Text2" with the name of the field you want to access the next.

    The problem with this approach is the Format or the key event isn't available for the fields for which you have selected one of the pre-defined formats types (for example, number). There are ways to work around this limitation, if necessary, but things get a little complicated.

  • Turn off the text box with the value of the checkbox

    Hello people,

    I am trying to activate or disable the text box with the value of the CHECKBOX, I have got the same thing with the BOX of ELECTION, with the javascript as follows: -.

    HEADER HTML
    ----------------------
    < script type = "text/javascript" >
    function disableOnValue (o)
    {
    If (o.value == 'Y')
    {
    document.getElementById('P2_TEXT_BOX1').disabled = false;
    document.getElementById('P2_TEXT_BOX2').disabled = false;
    document.getElementById('P2_TEXT_BOX3').disabled = false;
    }
    on the other
    {
    document.getElementById('P2_TEXT_BOX1').disabled = true;
    document.getElementById('P2_TEXT_BOX2').disabled = true;
    document.getElementById('P2_TEXT_BOX3').disabled = true;
    }
    }
    < /script >
    ---------------------

    under region Source whose Point display is < b > before < /b > foot and sequence is the last sequence of the entire region
    ----------------
    < script type = "text/javascript" >
    If (document.getElementById('P2_RADIO_BUTTON_0').checked is true)
    {disableOnValue (document.getElementById('P2_RADIO_BUTTON_0')) ;}
    on the other
    {disableOnValue (document.getElementById('P2_RADIO_BUTTON_1')) ;}
    < /script >
    ----------------

    and finally, to the title of point RADIO_BUTTON, HTML Form element attributes: -.
    -----------
    OnChange = "JavaScript:disableOnValue (this); »
    ----------

    the thing above works very well with the help of the RADIOBUTTON, but I want to try same thing with the CHECK_BOX I also tried a few changes but did not have any success so if someone help out me even that will be great and appreciated!


    Thank you

    Kind regards
    Kumar

    I also have the following in the Footer region region:

    <script type="text/javascript">
    x($x('P12_CHECKBOX'));
    </script>
    

    This is just to make sure that the items are disabled when the page is loaded, because the checkbox is deactivated

    Andy

  • Turn off the text box with calendar

    Hi, how can I set it so cannont users enter text in the text box next to the date picker? This way I can make sure they choose a date invalid.

    Hello

    One way is to add article attributes of HTML form elements

    onfocus="blur()"
    

    BR, Jari

  • How to turn off the wake-up upward after hibernation when I open the lid?

    I've set up the power button to hibernate your laptop.

    After pressing the button and wait some time to complete the process of hibernation, I close the lid.
    But when I opened the lid to examine, for example, battery charge indicator, laptop wakes up.

    Very annoying. How to disable?

    Why boring. I presume that you n t open the cover for nothing jut so you want to work with your laptop.

    If you see options for standby power, you will see that the option says: when I press the power button. When I open the cover, there is no option called.

    Sorry, but I think that there is nothing to do.

    By the way: in another topic ask you on the eve of power feature. Have you found a solution?

  • Can I turn off notifications by e-mail of Echosign when you use the API

    Hello

    I am trying to create a personal widget using the EchoSign API and I noticed that EchoSign sends an e-mail to the user with the signed copy after that that they have signed.

    Is there a way I can disable all notifications by e-mail of EchoSign when you use the API?

    Please contact support, or the Manager of your success.

  • Validation of the page when you press the button

    Hello

    I have an element of the P59_MAIL_EVENT page that must be completed before pressing the button P59_CREATE_ATTACHMENTS from another region. The P59_MAIL_EVENT field is a Popup LOV.  The button sets a value on page 60 and then redirects to the page 60. It works fine when the P59_MAIL_EVENT field is filled in. I am trying to introduce an error control to prevent the user from go to page 60, if they did not choose something in P59_MAIL_EVENT.  I tried a simple Page element / Not Null of validation, but it did not work.

    I created a validation step with PL/SQL function that returns a Boolean. It is associated with P59_MAIL_EVENT and the when button is set to P59_CREATE_ATTACHMENTS button. Validation seems to have no effect. It brings me to page 60 when the LOV is empty and the key, which is what I'm trying to prevent.

    BEGIN

    IF: P59_MAIL_EVENT IS NULL THEN

    RETURN FALSE;

    ON THE OTHER

    RETURN TRUE;

    END IF;

    END;

    Thanks for looking at this.

    PhilMan2 wrote:

    I have an element of the P59_MAIL_EVENT page that must be completed before pressing the button P59_CREATE_ATTACHMENTS from another region. The P59_MAIL_EVENT field is a Popup LOV.  The button sets a value on page 60 and then redirects to the page 60. It works fine when the P59_MAIL_EVENT field is filled in. I am trying to introduce an error control to prevent the user from go to page 60, if they did not choose something in P59_MAIL_EVENT.  I tried a simple Page element / Not Null of validation, but it did not work.

    I created a validation step with PL/SQL function that returns a Boolean. It is associated with P59_MAIL_EVENT and the when button is set to P59_CREATE_ATTACHMENTS button. Validation seems to have no effect. It brings me to page 60 when the LOV is empty and the key, which is what I'm trying to prevent.

    BEGIN

    IF: P59_MAIL_EVENT IS NULL THEN

    RETURN FALSE;

    ON THE OTHER

    RETURN TRUE;

    END IF;

    END;

    The P59_CREATE_ATTACHMENTS button must submit page and branch to page 60, rather than redirection so that validation works. Change the button action to redirect to submit and create a branch to page 60 which is conditional on the button get clicked.

  • How can I get the username field to automatically populate when asked to enter my credentials for the admin?

    I'm under El Capitan version 10.11.5. This is mac from my employer, which they made me an administrator for. On my mac personal home, the user name field is automatically filled in when the box appears asking an administrator user name and password, but on mac from my employer, I have to type at a time, whenever he appears.

    I can't find an option in the auto-complete settings and for the mac save my admin username it when you request permissions. Anyone else know how to change this?

    Maybe this needs a clarification:

    IF you are connected to a user admin "Your Own" account, and you are prompted for an admin password,

    Well, your user name will already be pre filled in the user name field, waiting for your own admin password, on the account that you are already connected.

    BUT, if another user is connected to their own user account, and a dialog box appears asking an admin password,

    Well, this pop-up dialog box will be empty if the current user is not an admin, or pre populated with the user name if the current user is an administrator.

    So, NO, I'm not aware anyway to do a random OTHER admin appears automatically in the box pop up when another user is logged on their different user account.  On your personal Mac at home, you are connected to your own account, (most likely, you are the admin), and when a box pop up on your own account is displayed asking admin credentials, your own user name will appear here.

  • The button to add/remove pages when you create several page PDF, while scanning is missing

    When you try to scan multiple pages into 1 pdf button to add/remove is not displayed on the form.

    Hello

    Of click Software HP scan a Document or Photo.

    Be sure to set the resolution to 300 DPI or lower.

    Click Scan and you should see the Add button of pages available.

    Kind regards

    Shlomi

  • The texts of TextArea of compensation when I press the Enter key

    Hello friends,

    I am new to Adobe Flex.

    Objective: I have a custom component named IOField based on the TextArea component. Inside the IOField, how to write the code that clears the text box when the user press ENTER key.

    I have the main application of this component is added as < comp: IOField / > xml namespace: comp

    Is there something in flex as fl.events.ComponentEvent which is present in flash?

    I'm doing things OBJECT oriented way taking into account the performance too.

    Help, please.

    Thank you.

    If you have extended the TextArea component, then you can use a small piece of AS3 to get the Keypress and delete the contents of the textfield object. something like that

    AS:

    private void changeEvent(e:KeyboardEvent)

    {

    if(e.keycode == Keyboard.Enter)

    {

    myTextArea.text = "";

    }

    }

    MXML:

Maybe you are looking for

  • need to uninstall El Capitan and return to the latest OS

    Can someone tell me how to get back to the BONE before El Capitan?   My connections to government security need the other oldest.

  • Satellite L300 - click left button broken

    My left click button broke and it is wobeling autour. Click it again, but it of boring and is horrible

  • for loop Board problem

    I'm really new to programming in labview (started on Monday). I followed the toturials of labview and online or Web site, but I have not been able to solve. Edit: all the values in the table are the same... Maybe someone here can take a look.

  • How long Subvi remains in memory

    Hello I would like to know how much a Subvi stay in memory? If it is no longer used LabVIEW automatically close it? Thank you! Tom

  • HP G60-535DX Windows 7 Home Premium internal Microphone Inaudible

    I have problems with the internal microphone located at the top of the screen on the laptop of HP G60 PC, pre-loaded with Windows 7 Home Premium operating system.  All OS, PC drivers and system ROM was updated to the current. The sound it produces is