/    Sign up×
Community /Pin to ProfileBookmark

Show/Hide IE Problem

I have a show and hide script that allows users to show and hide menus they want.

The problem I have is that when a user hides a menu for example and then navigates to another page, if they click the back button the menu is still shown as IE has not stored the new display value.

In FireFox this is not the case as it remembers the last state so when you click the back button the menu is still not shown.

Is there anyway around this or has anyone else had a similar problem?

Jemes

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@bals28mjkDec 06.2007 — Hey there jemes.

Page reloads vary from browser to browser, I'd put the data into a JavaScript [URL=http://www.quirksmode.org/js/cookies.html]cookie[/URL].
Copy linkTweet thisAlerts:
@jemesauthorDec 06.2007 — Thanks for the reply.

I've already got the users settings stored in a db. When the page loads the settings are then loaded onto the page. Then the user can update which menu's are show/hidden and this is updated in my db via ajax.

I've just checked my mates Facebook account and their Show/Hide menu's don't work in IE either. Hide some content and click another page, then click the back button and the content is still show. If you click refresh it's hidden.

Jemes
Copy linkTweet thisAlerts:
@James_McMurrayDec 06.2007 — Maybe add code to hide it to the page's unload function?
×

Success!

Help @jemes spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...