Disable submit button after clicking on it

Hi all,
I m beginner at working with JHeadstart.
I searched through this forum but I couldn't find any solution for my problem,
Now, i want to know how i can disable save button (or any other button) after clicking on it.
I dont know, but It can be done by writing .vm, do u have an idea?
Thanks for ur kind replies:)

Hi,
If you only want to be able to submit once you can add the following disabled property with EL expression to your save button in the jspx page.
disabled="#{adfFacesContext.postback}"
The save button will only be clickable upon initial entry of the page.
To persist this change when generating your application you can use a custom velocity template. Have a look at the JHeadstart developers guide, paragraph 4.7
http://download.oracle.com/consulting/jhsdevguide1013.pdf
If you want to have an insert only form you can also use an insert only View Object (go to the view object editor and select the tuning tab and the "No rows" option)
Regards,
Ruud Bijkerk
JHeadstart team

Similar Messages

  • How to properly disable a button after click or can an event disable itself?

    Can I disable  MouseEvent.CLICK after I clicked it?
    I am relatively new to coding and it seems to me as a mistake that an event will disable itself?
    Is it ok or is it prone to some mistakes?
    mainNav_buttonsGroup_mc.Products_btn_mc.addEventListener(MouseEvent.CLICK, onClick_Products_btn);
              function onClick_Products_btn(event:MouseEvent) :void {
                        gotoAndPlay("products");
                        mainNav_buttonsGroup_mc.Products_btn_mc.removeEventListener(MouseEvent.CLICK, onClick_Products_btn);
      Products_btn_timeLine.play();
    The idea is that I want to disable a button after it is clicked.

    The approach will work.  The event is not disabling itself.  The event is the occurence of the CLICK interaction.  The event listener is designated to detect that happening.  The event handler function for that listener is disabling the event listener.

  • Disable submit button after submission

    We have a form that we have distributed to multiple users. The form is set so that submissions go to a pre-defined server location. The problem is that some of the users submit the form multiple times (not sure why). Perhaps they don't notice the message that says "Form submitted". In any case, we would like to disable the submit button after the form is submitted (even it is only for that "session"). I know that once the form is closed and reopened the button will work again and that is ok. If anyone has some suggestions I would appreciate it. Thanks.

    hi,
    modify the above script to:
    this.access = "readOnly";
    your submit button will be set to read only.
    Regards--
    Chalukya

  • Disabling submit button after resetting the form.

    Hi. I'm new to JSF/Richfaces and there's something I'd like to do that I just can't figure out.
    Currently, I have a form with various fields to be edited, and the standard Submit and Reset buttons. The Submit button is disabled until a user changes a value on the form, and then I enable it using an A4J event. My problem is that I would like to disable the submit button again if the user clicks Reset. I'd like this to be completely client-side if possible, which I understand would require some javascript to implement, but I haven't been able to come up with a solution that works. Does anyone know how I could do this (with an example, preferably)?
    It's a pretty simple scenario, but here's the button code anyway:
    <h:commandButton id="submitButton" value="Submit" action="#{dataBean.submitForm}"
      disabled="#{! dataBean.pageEdited}" />
    <h:commandButton value="Reset" type="reset">
      <a4j:support event="onmouseup" reRender="submitButton" />
    </h:commandButton>

    I see, thanks! I looked up another example on using the DOM (I told you I was new!) and created the following javascript function, and it worked perfectly. I like that it automatically re-renders the button too so I don't need an A4J event.
    function disableSubmitOnReset(){
      document.getElementById('main_form:submitButton').disabled = true;
    }Definitely as simple as I figured it would be. :P

  • How to disable a submit button on click using javascript

    Hi,
    We have built custom pages for mobile device (PDT) using OAF.
    The application is running on mobile IE 6.12 browser. In mobile platform, the cursor style is not changing to hour glass upon clicking.
    Due to this, user is able to click the same button multiple times before the operation is complete and it is getting submitted multiple time. But the same is working fine in Desktop browsers.
    We have tried with ((OABodyBean)body).setBlockOnEverySubmit(true); But the API documentation states that
    "Sets If set to true, user input will be blocked after EVERY submit (not just PPR submits). This attribute is not supported on the following agent types: pda, phone, voice."
    Hence, I am trying with javascript to disable the submit button after the first click. The issue is, even in the desktop browser
    I am not able to get the button disabled after first click. Please help me.
    I have tried the following statments in PR. But none of them seems to be working.
    //Try 1: directly using id
    OASubmitButtonBean updBtn = ((OASubmitButtonBean)webBean.findChildRecursive("UpdateBN"));
    updBtn.setOnClick("document.getElementById('UpdateBN').disabled=true;document.getElementById('UpdateBN').submit()");
    //Try 2:
    OASubmitButtonBean updBtn = ((OASubmitButtonBean)webBean.findChildRecursive("UpdateBN"));
    updBtn.setOnClick("javascript:this.disabled=true;this.form.submit();");
    //Try 3:
    OASubmitButtonBean updBtn = ((OASubmitButtonBean)webBean.findChildRecursive("UpdateBN"));
    updBtn.setOnClick("this.disabled=true;this.form.submit();");
    //Try 4: using a function
    static final String JS_MULTI_CLICK = "<Script LANGUAGE=\"JavaScript\"> "
    +" function DisabSub(btn)"
    + "{"
    + "btn.disabled = true;"
    + "}"
    +" </Script>" ;
    OARawTextBean rawMultiClick = (OARawTextBean)webBean.findIndexedChildRecursive("JSMultiClick");
    rawMultiClick.setText(JS_MULTI_CLICK);
    OASubmitButtonBean updBtn = ((OASubmitButtonBean)webBean.findChildRecursive("UpdateBN"));
    updBtn.setOnClick("javascript: var obj =disable(this);return DisabSub(obj);");
    Can any one please help.
    Thanks in advance.
    Regards
    Saravanan

    Hi,
    Create two submit buttons A and B adjacent to each other.
    On page Load ,make A as rendered false and disabled true and B as rendered true. using SPEL.
    now on click of button B make button A as rendered true and Button B as rendered false through SPEL.
    In this way on button click the button will become disabled without the use of any javascript.
    Try it if it helps you...
    Thanks,
    Gaurav

  • Disable Report Button Once Clicked.

    Apex 3.2
    In my application I have been able to disable html buttons, once the user has clicked them, using
    the following in the url of the button.
    javascript:this.disabled=true;this.value='Creating DC...';doSubmit('SUBMIT');
    I have several updateable reports, that contain buttons. I would like to disable these buttons, when clicked,
    but do not know how.
    At the moment the sql in the report for the button is
    '<input type="button" name="map" value="Add Mapping" onclick="mapdc(''mapdc'','||whid||')">'  map
    and I have some javascript in the page header
    <script language="JavaScript" type="text/javascript">
    function mapdc(Request, whid){
    var answer=confirm("Do you really want to map Whid " +whid+ " to Gwhid " +$v('P39_GWHID')+" ?");
    if(answer==true) {
      $x('P39_WHID').value = whid;
      doSubmit(Request);
    </script>
    Any ideas ?
    Gus

    Think I may have sorted this out,
    Changed my javascript to
    <script type="text/javascript">
    function runjob(request,jobid){
    var answer=confirm("Do you really want to run job id "+jobid+" ?");
    if(answer==true) {
      $x('P3_JOBID_2').value = jobid;
    $x_disableItem('P3_RUN_JOB',true);
    $x('P3_RUN_JOB').value = 'Running Job...';
      doSubmit(request);
    </script>
    and my sql to
    '<input type="button" name="run_job" value="Run Job" id="P3_RUN_JOB" onclick="runjob(''run_job'','||jobid||');">' end  run_job
    Gus

  • Need to show popup when the Submit button is clicked for the second time ..

    Hi guys,
    I have a requirement where i need to show a popup or alert when the submit button is clicked twice . When it is clicked for the first time one method is been called and its process starts. When the user clicks the submit button for the second time they should be shown a popup stating "Submit button already been clicked, please clicked OK to continue".
    Can anyone help with this please , its really urgent requirement ?
    Thanks in advance

    Hi,
    I dont have any sample code to give you now. For quick reference, I can advice some psuedo steps to achieve your requirement. I dont have access to JDEV to test this. If any syntax errors then pls correct yourself.
    1. Extend Controller since it is standard page ( Refer Anil Passi site for steps to extend seeded ontroller)
    2. Write below logic in your Process Request method
    super.processRequest(oaPageContext, oaWebBean);
    pageContext.putSessionValue("status", "notInitiated");
    3. Include below logic in your PFR method
    if(pageContext.getSessionValue("status")!=null){
    if("notInitiated".equals(pageContext.getSessionValue("status")))
    super.processFormRequest(oapagecontext, oawebbean);
    pageContext.putSessionValue("status", "initiated");
    else
    String message = "Display error message as required";
    throw new OAException(message, OAException.ERROR);
    You may need to import required packages ( Related to OAException).
    Remeber, to sumbit the request, user need to refresh the page again so that "status" variable will be refreshed.
    Hope it helps.
    Thanks
    venkat

  • Change state of the button after clicking

    Hi,
    I've got following problem - I have navigation tollbar that
    consits of buttons. The buttons correspond to different pages of a
    content that is shown in Loader. I want the button I've just
    clicked to chage its state - so the button has to be highlighted in
    order to show which page is currently being viewed.
    How can I change the appearance of the button after clicking
    it? There'restates like Up, Over, Down, Hit but if I add one more
    keyframe and than make button.gotoAndPlay(5) while clicking the
    button, nothing happens.
    Thank you in advance,
    Yuri

    yuri82_dortmund wrote:
    > Hi,
    >
    > I've got following problem - I have navigation tollbar
    that consits of
    > buttons. The buttons correspond to different pages of a
    content that is shown
    > in Loader. I want the button I've just clicked to chage
    its state - so the
    > button has to be highlighted in order to show which page
    is currently being
    > viewed.
    > How can I change the appearance of the button after
    clicking it?
    > There'restates like Up, Over, Down, Hit but if I add one
    more keyframe and than
    > make button.gotoAndPlay(5) while clicking the button,
    nothing happens.
    Instead of actual button, use Movie Clips with multiple
    frames and simply send it
    to a frame which simulated DOWN state once pressed.
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Display success message in same page when submit button is clicked

    I have a jsp page, where i use a form to submit data into my database.when submit button is clicked, i am able to display "Data entered Successfully" in a different page. But i want to display the message in the same jsp page.
    what do i do?
    PS :- i have tried a javascript message box, but that is not working properly. I need this solved urgently.
    Thanks

    Hi Deeptha,
    What is APEX version your using and is it your select list with submit option ?
    Regards,
    Ajay Periwal

  • How to deactivate button after click??

    hello experts,
    how to deactivate button after click???
    there are 2 buttons
    Download | Add
    now if i click on download the download button should get deactive.....n  Add button position should not change..
    thanks in advance.

    Hi,
    1. Declare an internal table of type sy-ucomm. i.e.
    DATA : it_fcode TYPE TABLE OF sy-ucomm.
    2. Append Function Codes of the options in the Menu that you want to deactivate to the above declared internal table. For e.g. If DWL & ADD are the Function Codes of options that need to be deactivated then,
    APPEND 'DWL' TO it_fcode.
    APPEND 'ADD' TO it_fcode.
    3. Set PF_-Status as shown below.
    SET PF-STATUS 'status_name' EXCLUDING it_fcode.
    4. Now, the options in the menu bar with Function Codes 'DWL' & 'ADD' will be deactivated.
    aRs
    pOINTS ARE ALWAYS WELCOME

  • Have a window pop up after email submit button is clicked

    Is there a way to have a pop up occur after a user has pressed the email submit button? I need to have a reminder pop up as the form is submitted. Thank you in advance!

    Have you gotten an answer to this question yet?
    Here's what I did:
    I created a regular button with the following script on the "click event"
    EmailSubmitButton.execEvent("click");
    Then created another button (EmailSubmitButton)with the Control Type set to Submit; Submit to url should be: mailto:[email protected]; and Submit as PDF (if you want the actual form to come back to you) or XML (if you just want the data).
    Then I added a script under the EmailSubmitButton's PreSave Event, which states:
    app.alert("Your Form Has Been Submitted.");
    I distribute my form using the Adobe 8 Wizard and it works great.
    I would like to add a script that closes the form after submission. The script I found is
    app.execMenuItem("Close");
    This script is placed on the next line following the above app.alert message under the EmailSubmitButton. It works fine if you send the form manually via email, but Adobe has an error message when I try to distribute it.
    If anyone can help me with this issue. I would really appreciate it.
    Thanks,
    Jen

  • Thank you script after submit button is clicked

    Hi,
    Thank you for everybody's help. I was able to figure this one
    out. Another question I do have is how do I create a Thank you form
    after somebody clicks a submit button.
    So, visitor clicks a submit button and then he gets a Thank
    you script.
    Can anybody point me into the right direction?
    Again thanks for everybody's help.

    There are only two ways to process form data -
    1. Use mailto:[email protected] as the action of the form
    2. Use a server-side scripting method to a) harvest the
    form's data, b)
    process it in some manner, e.g., enter it into a database, c)
    formulate and
    send an email to one or more email recipients, and d)
    redirect the visitor
    to some ending page
    Method 1 is quite simple, and is also the least reliable. It
    depends both
    on your visitor having an email client already installed on
    their computer -
    this eliminates public computers, or home users without email
    clients
    installed (more and more it seems) - and on the installed
    email client
    responding to
    the mailto call. It is not possible to use this method *and*
    send the
    visitor to a
    thank you page as well.
    Method 2 is the preferred method, since it eliminates the
    problems of method
    1, but it means that you have to grapple with
    server-scripting somehow (ASP,
    CF, PHP, perl, etc.).
    You would have to decide which of these methods is best for
    your needs,
    but if it's Method 2, then start by asking your host what
    they provide for
    form
    processing.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "dreamweavernewbieny" <[email protected]>
    wrote in message
    news:e5ttnv$4pd$[email protected]..
    > Hi,
    >
    > Thank you for everybody's help. I was able to figure
    this one out. Another
    > question I do have is how do I create a Thank you form
    after somebody
    > clicks a
    > submit button.
    >
    > So, visitor clicks a submit button and then he gets a
    Thank you script.
    >
    > Can anybody point me into the right direction?
    >
    > Again thanks for everybody's help.
    >

  • RESOLVED - iExpense: Disable Submit Button based on checkbox not working

    Hi,
    We have a requirement for a checkbox in iExpense Review form(FinalReviewPG) where there should be a checkbox stating the terms and policies are met etc. Unless the user checks the checkbox the SUBMIT button shouldnt be enabled. I am creating the custom checkbox using personalisation in the page with initial/unchecked value as N and checked value as Y. This is created at SITE level.
    Now I have also created a custom controller extension xxButtonCO to extend the standard ButtonsCO controller which should do the disable/enable of the button OIESubmit. I ported this controller to the custom top and have extended the controller to both OIE Expenses Entry Flow function and Internet Expenses responsibility. But the checkbox though visible is not affecting the SUBMIT button. Also funnily, I save the controller class as xx.oracle.apps.ap.oie.webui.xxlcButtonCO and click apply only to see this concatenated to apps.ap.oie.webui.xxlcButtonCO / Function.
    Is that causing an issue? Also, sometimes I just run into an arbitrary NULL pointer exception and other times it says oracle.apps.fnd.framework.OAException: Could not create Java class. I have verified the class file not java file is in correct directory and has right permissions.
    What could possibly be wrong here?
    Edited by: 865082 on Jun 15, 2011 5:33 AM
    Edited by: 865082 on 20/06/2011 22:21

    Hi Kali,
    Many thanks for your response. I have quit trying to run this page directly from the instance and am now trying to do this firsly from the JDeveloper. The same issue is occuring from that end as well. My checkbox value is not getting recognised in the code. The checkbox is added to the Business Expenses tab and the intial/unchecked value is N while the checked value is Y. I am trying to control the submit button in the buttonbar based on the checkbox value using the following command
    OAMessageCheckBoxBean cbbean = (OAMessageCheckBoxBean)webBean.findChildRecursive("XXReviewCheck");
    where XXReviewCheck is the checkbox ID. However the print statements show that the cbbean is null. It is definitely calling the controller and trying to figure out the value. The value is just not coming to this section. Any ideas?

  • Spry validation disables Submit button

    Hey,
    I'm using spry validation on text boxes and dropdown menu's
    .. for some reason, on certain pages when the form is submitted and
    validated, if there's a problem with one of the fields, the submit
    button is disabled and won't enable again. Any ideas on how I can
    stop this from happening?

    Bump :o)

  • Custom validation is disabling submit button

    Hi there,
    I am using the update/insert feature within ADDT, but wanted to use my own validation using JavaScript. Everything works fine, the validation pop-up works etc, but the submit button is disabled. I'm guess that the transaction has started with the ADDT, but the javascript has stopped it. How can I get around this? any suggestions welcome...
    Thanks in advance...

    Hi,
    Have you tried different browsers to double check. I remember a couple months ago I was helping someone with a similar problem, it worked in one browser fine but not the other so we had to rewrite the code. Initially the code looked fine but just didnt work in IE.

Maybe you are looking for

  • How to undo the changed record!

    Hi I have edit a record in my form (haven't been saved). Now, I want to undo the changes on my record. How can I do that? Thanks null

  • Version number incorrect in .exe file properties

    Just reporting a little glitch in version 9.3.4, just installed here. When I run the program, "Help; About" says that it's version 9.3.4 as expected. But the version number reported in the properties of AcroRd32.exe is still 9.3.3.177

  • Want to learn SAP APO

    HI Experts, I have 4+ years of experience in SAP BI, now I am planning to learn SAP APO. Please give me sugessions is it is useful to future carrier and what are the best materials or documents to learn. Regards, SVS

  • Set a delay for automatic shutdown of virtual machines

    Hallo, is there a way to set a delay for the automatic shutdown of the guests when the host is shutting down? Just like the automatic startup delay but for the shutdown. The simplest possibility would be to shutdown the guest in the opposite of the s

  • Howto change the default error page in EP

    Hello all, I'm trying to find out where can I change the default error page when portal is loading  ("application stoped...") and replace it with my own friendly message . Thanks Amity