How can i disable a submit button and execute submit_action method on click

Good Day,
On my page I have a submit button that execute the submit_action method of the page backing bean that submit data captured on the page into a database and activate another class that send mail at the same time on a click of the submit button,the mail process takes a while before returning back to the page.I was able to disable the submit button to prevent the user from keep click while the process is running but the issue is on clicking the submit button it only disable the submit button without executing the submit_action method of the page backing bean.How can i disable the submit button and execute submit_method of the backing bean at the same time.
Thanks in advance.

I tried this out on one of my pages to see if it works.
First, I added the following JavaScript to my submit button's onClick event:
this.disabled=true; return true;When I clicked the submit button, it was disabled but the form was not submitted.
I deleted the JavaScript from the onClick event and added the following JavaScript to the form's onSubmit event:
var button = document.getElementById("form1:submitButton"); button.disabled=true; return true;When I click the submit button, it was disabled and the form was submitted but the button's action method was not called.
The next thing I tried was to change the onSubmit event code:
var button = document.getElementById("form1:submitButton"); setTimeout("button.disabled=true", 500); return true;This seemed to work. The difference was that I added a 1/2 second delay before disabling the button.
See if that works for you. If not then I'm fresh out of ideas.

Similar Messages

  • How can i put a submit button in a survey and it send to my email

    how can i put a submit button in a survey and it send to my email?

    Hi williamm89908146,
    You need to open the form in which you want to put the submit button,
    then you have to choose 'Add new field' under Tasks pane on the right Hand side of the window.
    Choose 'Ok' Button
    Place the button at desired Location
    Change the field name to 'Submit'
    Click on 'All Properties' (Button Properties window Will open up)
    Click on Actions Tab and then on 'Select Action:'
    Choose 'Open a web Link' from the Drop Down Menu and then Click 'Add'
    another window will appear in which you have to type this:    mailto:[your email address], eg: mailto:[email protected] later click close
    Click Close Form editing on the right hand side of the window
    Clicking on the Button would open up your default email client and your address would appear in 'To' field.
    Please feel free if you face any challenges in following through these steps.
    Regards,
    Rahul

  • How can you get your submit buttons to be a single click instead of the default double click?  (The

    How can you get your submit buttons on the quiz template to be a single click instead of the default double click?  (The option to choose double click or not is not showing in properties for this).

    Hmmm... Submit button doesn't need a double click at all. Maybe you are talking about the two-step process? When you click on Submit, the feedback appears with the message to click anywhere or press Y. Is that what you are talking about? If you are talking about a real double-click, something must be wrong in your file. And which version are you using?
    http://blog.lilybiri.com/question-question-slides-in-captivate
    Lilybiri

  • How can I disable the Voicemail button on an iPhone 4

    How can I disable the Voicemail button on an iPhone 4 or
    if that is not possible can i programme it to dial my own phone rather than my carrier's Voicemail box?

    No, it's not possible to disable that button and no, it's not possible to reprogram it to anything else.

  • How can we disable/Hide the buttons at items tab in header level Gen tab?

    Hi,
    How can i disable/Hide the buttons(Delete,insert...) in item details of general tab of Order Header?
    I am not able to do it with screen varients.
    Please let me know your views.
    Points will be given.
    Thanks,
    Adi.

    Hi,
    How can i disable/Hide the buttons(Delete,insert...) in item details of general tab of Order Header?
    I am not able to do it with screen varients.
    Please let me know your views.
    Points will be given.
    Thanks,
    Adi.

  • How can I disable ctrl+alt+del and other keys

    I need help on how to disable some keyboard key combinations (ctrl+alt+del)in particular. Disabling other keyboard keys is equally welcomed.
    Also how can I disable Windows 2000/XP's Task Manager from exposing my running program to be terminated.
    Thanks

    I need help on how to disable some keyboard key
    combinations (ctrl+alt+del)in particular. Disabling
    other keyboard keys is equally welcomed.This is not a java question per se. I would recommend searching on MSDN or some such site to figure this out.
    Also how can I disable Windows 2000/XP's Task Manager
    from exposing my running program to be terminated.This can be done by limiting the permissions of the Windows user that you would like to prevent from doing this. The user manager lets you do this.
    >
    ThanksNo problem.

  • Can you stylise the Submit button and can you manually place it

    Hello
    I have a large pdf document with the form in the middle of it, are you able to style the submit button and are you able to manually place it on a specific page when using FormCentral?
    Kind Regards
    Eugene

    Hi Eugene,
    There is a 500 field limitation, regardless of what subscription level you have. Please see: Maximum Number of Fields Reached
    Best,
    Sara

  • How can I disable the previous button in the first page and the next button in the last page?

    Hi all,
    I have created a new skin for a webhelp by modifying the layout and the buttons. However, I am not able to find a way where in we can
    disable the previous button ini the first page of the webhelp and hte the next page in the last page of the webhelp. If both the next and previous button is visibile in the first and last page, it is sort of misguiding the user.
    I am using Robohelp 9.
    Please advice.
    Thanks,
    Parag

    I think you are mixing Previous and Next in a browse sequence and the Previous and Next that you get in the browser itself.
    In a browse sequence, they are automatically disabled at the start and finish. When in the first topic in the sequence only Next will be enabled, when in the last topic only previous will be enabled.
    Previous and Next in the browser are working on the topics your user has viewed which is not the same thing.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How can I get one Submit button to perform three actions?

    I have a 2-page form. One page is completed by an HR person, entering fields that describe a new role, new pay, new hours or a new location for an existing employee. The second page automatically repeats the name, location and job role fields, but also completes the IT requirements linked to the job role (such as whether or not the role needs access to a particular piece of software or not).
    The users of the form will have varying degress of IT capability. I wan to enable them to press a single Submit button that does three things: first, print the first page of a two-page form AND e-mail the same page to one e-mail address. Second: e-mail the second page only to a DIFFERENT e-mail address.
    I am not a Javascript expert - or even a beginner. Can anyone help? I need to get this ready for Tuesday! Thanks in advance

    You will need two buttons on your form to be able to do this.
    One is the actual submit button (this will interact with th email system and do the submit). Note that you cannot write programs on a submit button. You will need to make this button invisible to the user. The second button will be a regular button which you can write programs on. Use teh click event of that button. This one will have logic to accomplish the things that you want ...here is some pseudo code to do this:
    use print command and one of the parms indicates which pages to print.
    Set up the submit button to hold the email address of the person recieving it.
    Programmatically click the hidden submit button.
    Note that the user will recieve a dialog from the mail client to OK before teh form will be sent.
    Set up the submit button to change the email address
    Programmatically click the submit button again
    User will recieve another dialog to OK the email submission
    Also you cannot email part of the form it will have to be the whole form. You coudl get a little more sophisticated and hide parts of the form but the whole form will be sent with the emails. This will need more programming on your part.
    Paul

  • How can I disable display/Change Button on transaction code VL03N

    Dear Guru,
      I found problem about transaction code vl03n because I define authorize for a user that can only display delivery document by transaction code VL03N. But this transaction have display/change button that when user click this button they can change delivery document. Please help me how can I solve this problem?
    Best regard,
    wipaporn

    Wipaporn,
    This should be done authorizations only. Although the button is displayed, is the user able to change and save the Delivery document?
    Regards,
    Ravi

  • How Can I Disable Access Keys - Alt- and Ctl- on All Web Sites?

    How can I tell Firefox to Disable the use of Access Keys such as Alt-? and Ctl-? on All Web Sites?
    Thanks.

    See:
    *http://kb.mozillazine.org/Accessibility.accesskeycausesactivation
    *http://kb.mozillazine.org/Ui.key.contentAccess

  • How can I create a submit button that only saves?

    Our end users will save the completed form and later upload it to anotherg place.  I created a save button that works fine, but without a Submit button there is nothing to trigger the reminder to go back and answer required questions.  I don't want to lose that part.  Thanks in advance for any help you can offfer!

    Would something like this work for you?
    var OKToSave = true;
    if (tfSomething.isNull) {
              tfSomething.border.edge.color.value = "255,0,0";
              OKToSave = false;
    else tfSomething.border.edge.color.value = "255,255,255";
    if (!OKToSave) app.alert("Please fill in all required fields");
    else app.execMenuItem("SaveAs");

  • How can I set the submit button to email only certain pages of the pdf not the entire pdf?

    We have a pdf that is a hundred pages or so where each page is an individual product that the customer can select for purchase. At the end of the pdf is an order form. We want to be able to email just the few pages which are the form as a pdf. The default function of the submit button is to email back the entire pdf. As there any way to just select whcih pages would be submitted?

    The problem is for people not using an email client like Outlook. In the version of Reader my boss was using, you had to save the FDF file to your hard disk and then open your browser to go to your web based email and write an email and attach the file. In the newest version of Reader it will open a browser window and create a draft for you, but he thought it was to much work if people were using older versions of Reader. He was really looking for something straightforward where all they had to do is push a button and it was submitted.

  • How can I disable thefirefox 4 beta and go back to firefox 3

    I find that i extremely dislike this firefox 4 beta and want to go back to the way my firefox was before I installed it. If it is something I have to do with my computers hard drive then fine.

    You can uninstall Firefox 4 Beta 12 and get Firefox 3.6.14.
    However, I do not recommend to switch back to Firefox 3.6 because Firefox 4 will get shipped in March and after 6 months Firefox 3.x will be discontinued. Another solution is to ask how to fix the problems faced by you using Firefox 4.

  • How can I disable the "Pause" button to not show up when I am in a phone call?

    I want to disable the pause button as it got pressed every time my cheek touches the screen while in a phone call.
    Any tip will be very much appreciated!
    Martin

    http://www.applevis.com/guides/voiceover-keyboard-shortcuts-mac-os-x
    You should be able to copy them from there.

Maybe you are looking for

  • Can I upload music from my iPad2 to my new macbook pro?

    Can I upload music from my iPad2 to my new macbook pro? Dave

  • Obvious defect in iPod Classic

    Judging by the number of users on this forum alone who are experiencing severe iPod problems that basically make the unit useless, I'd say Apple has a serious problem with iTunes-iPod Classic. If I can't use iTunes to get music on my iPod then the iP

  • You must supply a valid username and password to log onto the system.

    hi, i installed hyperion performance suite8.3 on linux by root account,during installation, i select "native" authentication, after installation, when i login the web interface by root account, it tell me: You must supply a valid username and passwor

  • Urgent    error in output determination

    Hi all I’m getting the errors window TITLE is not defined for form RVORDER01 and error during readingTVBUR (return code 4) pls let me know if u have any inputs.

  • Dynamic Data forms

    Hello, In HFM Data forms, is there a ways that I can make the Form columns dynamic - I wanted my columns to pull the base members of the entity selected in POV. Is that possible? Thanks, Samy