Prevent user from double clicking Next button

2 posts, 0 answers
  1. Jason
    Jason avatar
    1 posts
    Member since:
    Jun 2015

    Posted 12 Jun 2015 Link to this post

     

     Does anyone know of a way to easily prevent double clicking the next button. e.g. I dont want to charge the user's credit card twice.

     

    Any help would be great. Thanks!

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 16 Jun 2015 Link to this post

    Hello,

    You can cancel the second "Next" button click conditionally in the RadWizard's OnClientButtonClicking client-side event handel as shown below:
    function OnClientButtonClicking(sender, args) {
        var command = args.get_command();
        if (command == "1") {
            //condition
            if (true) {
                args.set_cancel(true);
            }
        }
    }

    Command code "1" accessible through the event arguments indicates that the "Next" button is clicked. Then you can conditionally cancel the event depending on some control's value or other custom logic.

    Regards,
    Ivan Danchev
    Telerik
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top