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 1017139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:39:29+00:00 2026-05-16T10:39:29+00:00

I have a page with a form where I’m trying to prevent duplicate submission,

  • 0

I have a page with a form where I’m trying to prevent duplicate submission, which is fairly straightforward (in case anyone’s curious, I used this

$("form").submit(function()
{
    setTimeout(function()
    {
        $("input").attr("disabled", "disabled");
    }, 50);
});

…which I stole from this page, and it works fine. As expected, the inputs are disabled quickly, the form is submitted as expected, and the user is redirected.

Here’s my problem: I anticipate users using the Back button sometimes instead of in-page navigation, so I would like for the page to be functional if they click the Back button. However, when I click the Back button after the successful post, I’m returned to the previous page with all the inputs disabled (as you might have known would happen). I’d like them to be able to use the page, if they desire, after clicking the Back button.

I first tried using header/meta tags to tell the browser not to cache the page, but that didn’t work (in Firefox 3.6.8) – and then I decided I didn’t want to do that anyway, because it probably wouldn’t be cross-browser compatible, and may not be a best practice anyway (here is one such case to be made). I don’t want to use anything that “breaks” the Back button like some applications I’ve seen do (like, when the user clicks it, it doesn’t take them back a page, but forces them to stay on that page), which to me seems like a bad idea. Does anyone know of a way I can prevent duplicate form submission on the client side without rendering the page useless when the user clicks the Back button? (In case it matters at all, I’m using ASP.NET MVC 1).

  • 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-05-16T10:39:30+00:00Added an answer on May 16, 2026 at 10:39 am

    Well, it doesn’t sound like anyone else has thought of a better idea and posted it. I noticed our own Stack Overflow has the same behavior (at least on the Ask Question page), disabling the submit button, and when I clicked “Back”, the button was still disabled. Maybe the best I can do is to leave it with the button(s) disabled, thus forcing them to refresh the page manually, or (hopefully) encouraging them to use the site navigation instead of the Back button where possible.

    If anyone else has any better ideas, though, I’m still open to them.

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

Sidebar

Related Questions

I have a page which should show a form with checkboxes, post back if
I have a batch class (KC8) which is using page/form recognition and separator zones
I have a multi-page form, and I'm trying to implement Back buttons, so that
I have a page which submits a form on page load and redirects the
I have a Page (form) that has many UserControls on it, and I'm trying
I have a multi page form that I am trying to implement on my
I have a page which is used for searching through listings by submitting data
I have a form page in which either an INSERT or an UPDATE query
I have a multi-page form, aka a Wizard pattern, where Page 1 corresponds to
I have a form page in PHP that reads a DBF, and conditionally converts

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.