Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9097701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:10:52+00:00 2026-06-17T00:10:52+00:00

I am using a partial view in that which is as follows:- @using (Ajax.BeginForm(UpdateStatus,

  • 0

I am using a partial view in that which is as follows:-

@using (Ajax.BeginForm("UpdateStatus", "Controller", new AjaxOptions
{
HttpMethod = "POST",
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "divCurrent",
OnSuccess = "cleanUp",
OnFailure = "statusUpdateFailure"
}))
{
<input id="statusChange" type="submit" value="Submit" class="button" />
}

Also on the click of submit button i want a handler like after one click it sets to disabled for few seconds so the user cannot click it again and i am doing that as follows:-

$('#statusChange').click( function () {
    temporarilyDisableButton($this, 60000);            
});

but in chrome i am having the issue that the ajax form submit doesnot work. Only disabling the button works.

I want to execute both of them together or if there is an alternate way i want to use that.

Please suggest.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T00:10:53+00:00Added an answer on June 17, 2026 at 12:10 am

    I’ve ran into a similar issue where some browsers will not submit the form if the submit button is disabled. You’re disabling the button altogether before it actually triggers the submit event.To get around this, you can either submit the form before disabling the button or hide the button temporarily instead of disabling it.

    You will have to give the Ajax form a client id by passing in your Html options new { id = "myAjaxForm" }.

    @using (Ajax.BeginForm("UpdateStatus", "Controller", new AjaxOptions
    {
    HttpMethod = "POST",
    InsertionMode = InsertionMode.Replace,
    UpdateTargetId = "divCurrent",
    OnSuccess = "cleanUp",
    OnFailure = "statusUpdateFailure"
    }, new { id = "myAjaxForm" } ))
    

    Then you can do this on click

    $('#statusChange').click( function () {
       $('#myAjaxForm').submit();
        temporarilyDisableButton($this, 60000);
        return false; //stop the button from performing its default action
    }
    

    Alternatively, you can get rid of your click event altogether and bind an event to the submit function:

    $('#myAjaxForm').submit(function(){
    temporarilyDisableButton($('#statusChange'), 60000);
    });
    

    There are countless ways to do this but the basic idea is that you don’t want to disable the submit button before it has a chance to trigger the event.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a view that loads a partial view from a controller action using
I'm using MVC2 with VS2010 I have a view that has two partial views
I want to render the partial view using ajax. When I submit the button,
How to render partial view in some specific div without using ajax in asp.net
Using the following JQuery/AJAX function I'm calling a partial view when an option is
A partial view that I'm using requires certain jQuery libraries to be included, and
For reasons currently unknown, in a strongly typed partial view that handles editing which
I have a number of pages that include the same partial view which contains
I have a partial view which is returned via an Ajax call with a
I'm trying to display a partial view using a custom helper method. The only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.