Skip to Content
author's profile photo Former Member
Former Member

Prevent double clicking of Button event

Hi Guys,

Can any one of you help me out, how to restrict the user from preventing double clicking of the button event.Now what happens is it is posting twice the logic.

Thanks in Advance for helping me.

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 09, 2004 at 03:11 PM

    Kumar:

    When you define the button, set the "OnClick=" event to execute a Javascript function to disable the button. Once the button is clicked the first time, it will be disabled, and the "Post" code will only run once.

    Regards,

    D.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 09, 2004 at 03:20 PM

    It depends what you want to do.

    If you like to allow user just once the clikc on your button then set it inactive after first input processing.

    if you need it while your input processing is running

    then use <xhtmlb protect double submit> - you find it in your tag browser under xhtmlb elements it blocks your

    application with a "Please wait" box while your input is

    in work an give it free after that...

    Sometimes (not often) its good to look into the SAP

    samples...

    Regards Matthias

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 18, 2004 at 12:23 PM

    Hi Kumar,

    Write this at the top of the page:


    And put this where you define the submit button: onClientClick="disableButton();"

    It will submit a form only once.

    Br

    Mikko

    Message was edited by: Mikko Mäkelä

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 10, 2004 at 06:52 AM
    -1

    Hi Matthias,

    Thanks for the timely help. But what i observed is when we incorporate the xhtmlb tag itself i could see the "protectDoubleSubmit" is inherited by default. So i thought we needn't need to call it explicitly.

    Hi D:

    Since the htmlb buttons basically given as a link inside in the css, i was not able to disable it after clicking.All that i was able to do is, i was have given a Hour glass icon 😊

    Thanks Guys.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.