473,569 Members | 2,762 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

strategies for restoring hidden divs when user clicks back button

Depending upon a radio button button's setting a div is either hidden
or visible.

It turns out that the default view of the page requires that the div
be hidden.

When the user opts for the setting that makes the div visible, clicks,
and then clicks the back button the page renders with the div hidden.

I've tried a few strategies to handle this. Adding no-cache meta tags
(not on the server side though and BTW, I'm using JSP), adding a
parameter to the query string on the forwarding page and looking for
it in the request object, looking at the HTTP_REFERRER. Nothing has
worked.

Has anyone run into this issue before and come up with a solution to
this problem?

Thanks.

Jul 24 '07 #1
3 1740
On Jul 24, 6:43 pm, "gimme_this_gim me_t...@yahoo.c om"
<gimme_this_gim me_t...@yahoo.c omwrote:
Depending upon a radio button button's setting a div is either hidden
or visible.

It turns out that the default view of the page requires that the div
be hidden.

When the user opts for the setting that makes the div visible, clicks,
and then clicks the back button the page renders with the div hidden.

I've tried a few strategies to handle this. Adding no-cache meta tags
(not on the server side though and BTW, I'm using JSP), adding a
parameter to the query string on the forwarding page and looking for
it in the request object, looking at the HTTP_REFERRER. Nothing has
worked.

Has anyone run into this issue before and come up with a solution to
this problem?
The code that synchronizes the div with the radio button must be run
on page load (onload event.) This is because browsers persist and
restore the states of form elements.

Jul 24 '07 #2
ASM
En réponse à gi************* ******@yahoo.co m qui nous a susurré, en date
du : 25/07/07 0:43, le message sibyllin suivant :
Depending upon a radio button button's setting a div is either hidden
or visible.

It turns out that the default view of the page requires that the div
be hidden.

When the user opts for the setting that makes the div visible, clicks,
and then clicks the back button the page renders with the div hidden.

I've tried a few strategies to handle this. Adding no-cache meta tags
(not on the server side though and BTW, I'm using JSP), adding a
parameter to the query string on the forwarding page and looking for
it in the request object, looking at the HTTP_REFERRER. Nothing has
worked.

Has anyone run into this issue before and come up with a solution to
this problem?
back button is to do what ?

to go back, no ?

so, how do you expect, going in past, to get the present ?
of corse, the referrer will not help you, pressing back button you don't
call precedent display's url, you ask the browser to show this one from
its cache.

I do not understand you'd search a server side solution ...

--
Stephane Moriaux et son (moins) vieux Mac
Jul 24 '07 #3
On Jul 24, 3:51 pm, David Mark <dmark.cins...@ gmail.comwrote:
On Jul 24, 6:43 pm, "gimme_this_gim me_t...@yahoo.c om"

<gimme_this_gim me_t...@yahoo.c omwrote:
Depending upon a radio button button's setting a div is either hidden
or visible.
It turns out that the default view of the page requires that the div
be hidden.
When the user opts for the setting that makes the div visible, clicks,
and then clicks the back button the page renders with the div hidden.
I've tried a few strategies to handle this. Adding no-cache meta tags
(not on the server side though and BTW, I'm using JSP), adding a
parameter to the query string on the forwarding page and looking for
it in the request object, looking at the HTTP_REFERRER. Nothing has
worked.
Has anyone run into this issue before and come up with a solution to
this problem?

The code that synchronizes the div with the radio button must be run
on page load (onload event.) This is because browsers persist and
restore the states of form elements.
That is a good solution.

Another possibility would be to use location.hash. This won't work
well with multiple divs, though.

location.hash = '#' + activeDivId;

This is useful when you want to come to the page state from a link,
bookmark, or history, too.

Jul 25 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
4906
by: Mark | last post by:
I have a working PHP/MySQL application used for data entry. The data entry screen includes a "Save" button. The PHP code for this button looks like this: if (isset($_POST)) { if ($_POST == "") { include ("InsertRecord.inc"); // Insert new record }
7
1808
by: Luis | last post by:
Application X has three screens. The user captures information on screen one and then clicks a navigation button to go onto screen two. He does the same on screen three. At the bottom of screen three is a submit button. When this button is clicked the system does some calculations with the information that is supplied and then uploads all the...
13
40655
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div style="display:none"> can be displayed by setting the style attribute to "display:", or hidden with "display:none". This gives the illusion that the person...
1
12091
by: tabert | last post by:
I want to use JavaScript when a button is clicked to show and hide a SPAN or DIV. This works in both IE and Netscape, but what I'd like to happen is for there to be no white space where the hidden div is. I start with two visible divs and in between them are two more hidden ones...in Firefox this works fine--the two visible ones are right...
8
2551
by: Galina | last post by:
Hello I have 6 dependent list boxes on my ASP page:  Faculty;  Lecturer;  Course;  Course occurrence;  Group;  Week commencing date. When faculty is selected, lists of lecturers and courses are populated. When course is selected, lists of occurrences, groups and
3
2737
by: rdemyan via AccessMonster.com | last post by:
I'm thinking about providing a relatively easy method for users to restore the front end from a backup. The purpose is to allow for restoring if the front end becomes corrupt. Here are some particulars about my app 1) The front end is distributed as a .mde file. 2) Front end uses workgroup security 3) A separate logon form is used to...
4
2340
by: reikoshea | last post by:
okay ive been working at this for probably 4 hours now, and I (not to mention my boss) am pretty upset. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html;
3
1563
by: andersond | last post by:
I have a webpage that uses visible and hidden tables to create the effect of going from screen to screen. Because a user might want to go back and change previous selections I have a "previous page" button that goes back to a table that has been made hidden. Text fields retain their values; but, option buttons do not. I am having problems...
0
7694
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
1
7666
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6278
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.