Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

remember drop down form selection

Status
Not open for further replies.

rkoya

IS-IT--Management
Joined
Jul 12, 2004
Messages
57
Location
GB
Hi,

Basically I have a form that with dropdown boxes, I have a box where i choose a destination when a destination is chosen it then populates another 2 drop down boxes called pick-up location and drop-off respectively, with the same information. I click search which brings up my results, but if I click back in Internet Explorer it doesn't remember the selection in the pick-up and drop-off boxes. It remembers the destination. In Firefox it remembers it all. Can anyone help?

I have attached my code:

<select accesskey="d" name="area" class="DROPDOWNTEXT"
onchange="document.details.slct.value=0;ckDstn(document.details.elements['area'].options[document.details.elements['area'].selectedIndex].value);">
<option value="sel" selected>select a destination</option>
<option value="|test|0"></option><option value="none">Balearics - </option><option value="ibiza airport|test|148">- Ibiza Airport</option></select>

<select accessKey="o" name="pickuplocation" class="DROPDOWNTEXT" onchange="this.form.slct.value = this.selectedIndex;ckPickUp(document.details.elements['pickuplocation'].options[document.details.elements['pickuplocation'].selectedIndex].value);">

<select accessKey="o" name="tdropoff" class="DROPDOWNTEXT" onchange="this.form.slct2.value = this.selectedIndex">

can anyone help
 
also i do not want to use cookies if possible.

Thanks
 
Try running a function "onload" that tests to see if a dewstination has been chosen, and if so, automatically populates the pick-up and drop-off boxes, if they're not already populated.

Hope this helps,
Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
You could have the search information appear in a popup window so the form page has not been left so the selections remain.
You could use Ajax to retrieve the data and display it within the same page as well, also not directing the user to another page and losing selections.


Stamp out, eliminate and abolish redundancy!
 
Ok thanks for your help guys, will try your suggestions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top