In a form, I have two select lists. One holds the available options.
I have some buttons between them for moving items from one list to the
other. When the form first loads, all of the items are in the
available list and none are in the used list.
Available Used
--------------- ---------------
|item1 | |item3 |
|item2 | >> | |
|item4 | > | |
| | < | |
| | << | |
| | | |
--------------- ---------------
When you move an item, I either add it to or remove it from a
comma-delimited list in a hidden input box. When the form is
submitted, I do fun things with the contents of the hidden input box to
make pretty output.
When you click the back button in Mozilla Firefox, You get the form
just as it was when you submitted it, which is good. However, when you
click the back button in IE, the two select list boxes display like
they would after a fresh page load. At the same time, instead of
defaulting to blank, the hidden input box retains its contents that it
had at the time of the form submision. This means that you can have
multiple instances of the same item in the hidden input box, which
reaks havok on my action page.
Does anyone know how to fix this problem in IE?
Thanks,
Chris Lieb 1 1905
Chris Lieb said the following on 4/14/2006 10:32 AM: In a form, I have two select lists. One holds the available options. I have some buttons between them for moving items from one list to the other. When the form first loads, all of the items are in the available list and none are in the used list.
Available Used --------------- --------------- |item1 | |item3 | |item2 | >> | | |item4 | > | | | | < | | | | << | | | | | | --------------- ---------------
When you move an item, I either add it to or remove it from a comma-delimited list in a hidden input box. When the form is submitted, I do fun things with the contents of the hidden input box to make pretty output.
That sounds like making it harder than it is. Simply submit the form and
let the server pick up the options of the second select list. onsubmit
you make them all selected and then the server will get the list.
When you click the back button in Mozilla Firefox, You get the form just as it was when you submitted it, which is good.
Depends on how you look at it.
However, when you click the back button in IE, the two select list boxes display like they would after a fresh page load.
That is, perhaps, the way it is supposed to work. You are in fact
reloading the page (sort of). You are just reloading it from the cache
instead of the server.
At the same time, instead of defaulting to blank, the hidden input box retains its contents that it had at the time of the form submision.
Now that is bad. If IE is going to reset the selects then it should
reset the hidden inputs as well.
This means that you can have multiple instances of the same item in the hidden input box, which reaks havok on my action page.
When anything is added to the hidden field, rather than add to it,
replace the hidden fields contents with the contents of the select list.
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Henke |
last post by:
Hi,
I have done some research about my problem I have
when using the "back button" in IE to go back to a
page with two dropdown lists.
The both dropdown lists
are populated with data. The first dropdown lists is
redirecting the user to another page (building a querystring
for the second page to use) and when the back button
|
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
|
by: Mark |
last post by:
I have two dropdown lists. Both have autopostback set to true. In both
dropdowns, when you select an item from the list, it redirects to the Value
property of the dropdown. Nothing fancy.
Let's say you select 1 of the items, and are properly redirected. You press
the back button. I have three servers providing two different
functionalities:
1. After pressing the back button, the item you selected in the dropdown is
still selected.
|
by: planetthoughtful |
last post by:
Hi All,
I have a relatively simple web user control I've included in a page
that simply presents 3 drop down lists and a submit button, that I use
as a date picker (ie one list for day, one for month, one for year).
I have the control registered on the page and it displays fine, but I
haven't managed to work out how to get the value(s) back from the
control on clicking the submit button (performs a postback). I want to
use the date...
|
by: bill |
last post by:
I dynamically create buttons and associate them with an event using
AddHandler.
I want all the button events to fire at one time, when the page is posted,
instead of when each button is clicked.
How I stop the buttons from posting back when they are clicked?
Thanks
| |
by: lucyh3h |
last post by:
Hi,
In one of my pages, I use javascript (AJAX) to populate one mulitple
select field based on user's click event on another control. I noticed
that when I navigate back to this page by clicking browser's "Back"
button, the changes made to the multiple select is not preserved. (It
shows the initial value). While all the other user selections are
preserved.
Firefox seems fine.
How do I workaround this issue for IE?
|
by: =?Utf-8?B?QWxCcnVBbg==?= |
last post by:
I have a form containing three AJAX UpdatePanels, two of which contain a pair
of listboxes and a pair of buttons, with the third one containing a pair of
radio buttons in a radiobutton list and either three CascadingDropDown lists
or two CascadingDropDown lists and a textbox depending on which radio button
is selected. The only other control on my form is a button to submit the
information on the form to the server.
One thing I've...
|
by: mcl |
last post by:
I have a domain name which is set up for web forwarding with a frame.
I have a link on one of the site's pages to an external site.
When I select the link the external site is displayed correctly with
its own URL in the address bar.
When I select the <backbutton in the browser, my domain name appears
temporarily in the browser, but it returns to the external site.
If I look at back History (In Firefox) there are two entries for my...
|
by: Harvey Schmidlapp |
last post by:
I have a fairly complex form (generated by means of an ASP 3 page).
The form is used to define a query against a database. After running a
query, the user hits their browser's back button and goes back to the
form, where their selections show up. They can change whatever they
want to change and resubmit the new query. Mostly, everything works
fine, with radio buttons, selection lists, check boxes all coming back
in the state they were in...
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |