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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:49:00+00:00 2026-05-16T03:49:00+00:00

I have a form where everything is supposed to be disabled on load except

  • 0

I have a form where everything is supposed to be disabled on load except the first field.
The first field is an autocomplete input. When they select something from it, it goes disabled, and then sets the second field to be enabled. The second field is a dropdown.

The problem is, after a user uses the form and clicks the back button, it goes to a state similar to the one it was in before they clicked submit–
1- autocomplete is disabled (but has no value for some reason)
2- dropdown is enabled, and set to the value they submitted with

I’ve tried to force the restoration of the form with javascript (using jquery’s .ready()), but the .ready() doesn’t run after they go back with the back button..

Refreshing the page after going back restores it. Any ideas how I can fix this?

  • 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-16T03:49:01+00:00Added an answer on May 16, 2026 at 3:49 am

    The problem is that browsers are inconsistent in how they handle the back button. Firefox, for example, caches the state of the HTML (post-Javascript processing) and returns to that state after hitting the back button, but some others don’t.

    The best thing for you to do is after the submit, you should redirect to a URL that contains HTML representing the submitted data with the ability to edit those submitted details. This will give your users less of a desire to want to hit the back button.

    Edit:

    You should also add this to your page:

    <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"> 
    

    That is supposed to prevent browsers from caching the changes of the page’s state. I assume you’d prefer it so that when the user hits the back button they start from the beginning state of the page.

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

Sidebar

Related Questions

No related questions found

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.