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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:44:57+00:00 2026-06-05T01:44:57+00:00

I have a bit of an issue with page formatting when I navigate away,

  • 0

I have a bit of an issue with page formatting when I navigate away, and then hit browser back to a page.

Here is an example:

I have security questions on a form in a drop down list like so:

https://i.stack.imgur.com/ib32z.jpg

When the user selects [Type in your own question] from the drop down list, I have some jquery that animates a CSS change that pushes the form down, and makes visible a hidden field for ‘custom security question’. When selected, the form looks like this:
https://i.stack.imgur.com/uVPKo.jpg

Now my dilemma is when I navigate away from this page, and then navigate back using the browsers back button, my formatting gets screwed up and looks like this:

https://i.stack.imgur.com/5Xhpi.jpg

The javascript that I have written does not trigger again on the back button so the browser doesn’t know to move the form back down to accomodate the change in spacing. Is there anyway I can force the document.ready to reload or clear some kind of cache?

Thanks!

EDIT: Sorry guys, I need to reupload the images to a host and repost. Sorry for the delay.

  • 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-05T01:44:59+00:00Added an answer on June 5, 2026 at 1:44 am

    There are basically four mechanisms for persisting state on the web:

    1. Browser-based – the browser, if you’re lucky, will save answers to form fields and re-display them when it sees an INPUT with the same name; also, some browsers will preserve some state between forward<=>back navigation
    2. Cookie-based – pretty self-explanatory; you save a cookie with the state info, and check it later to recover the state
    3. URL-based – navigate to a different hash of your URL, with the info you want in it (eg. “?roll_down=true”)
    4. HTML5/Local Storage – Look it up if you’re interested 🙂

    We can basically throw 1 and 4 out, because they both rely too much on browser behavior/support, and we can’t reliably rely on all browsers to handle them the way we want. That leaves #2 or #3.

    Cookies allow you to save more info (as much as a cookie holds, ie. about 4k). URLs allow less info, but they have the added benefit of bookmark-ability; if the user saves the URL as a bookmark (or as a link they send a friend, or whatever), the state still gets preserved.

    So, take your pick of the above, decide on how to persist your “my form is rolled down” state … and then comes the part that (I think) you’re really interested in: how do you check this state and fix things when the user clicks “back”?

    That part I humbly defer to another SO post, which has already answered it:
    Is there a way to catch the back button event in javascript?

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

Sidebar

Related Questions

hello fellow java developers. I'm having a bit of an issue here. I have
I have a bit of a strange issue here. I created a custom control
I have a bit of a ridiculous issue here and I must be missing
I have a bit of an issue with my SQL statement. It is a
I have a bit of an issue with a site I maintain. I have
I am having a bit of a issue. I have an NSMutableDictionary with 10
I have run into a bit of a design issue with my code. I
I am having a bit of a strange issue. I have a ListView which
Have a bit of confusion here. I added a few objects from a class
I have a bit of strange problem on this page: http://www.bluprintliving.com/locations it seems that

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.