473,320 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Keeping a option,select drop down list open on refresh / postback

Hi there

I have a option, select drop down list which a user can open. My page
however refreshes very frequently and when this occurs the selected
drop down list will pop back up. The user then has to open the drop
down list again.

I just wondered if there was a way using javascript to firstly detect
if the user has selected the drop down list and if so, on refresh to
set that drop down list to stay dropped down?

I hope that makes sense, if it doesn't please let me know!
Thanks for your help
Chris
Jun 27 '08 #1
2 3296
Cris, how is the page refreshing?

If the user is refreshing it by presing the refresh button, or the
page is refreshing itself using meta tags, then there is no way to
pass any state information to the page and you can not do it.
HOWEVER, if the page is using JavaScript to refresh, then you can load
the page instead of refreshing it and send it the value of the
currently selected dropdown, and reset the dropdown to that state when
the page reloads.

How is your page setup, is it just one frame?

Graham
Jun 27 '08 #2
On May 9, 1:23 pm, Laser Lips <loudsphi...@gmail.comwrote:
Cris, how is the page refreshing?

If the user is refreshing it by presing the refresh button, or the
page is refreshing itself using meta tags, then there is no way to
pass any state information to the page and you can not do it.
HOWEVER, if the page is using JavaScript to refresh, then you can load
the page instead of refreshing it and send it the value of the
currently selected dropdown, and reset the dropdown to that state when
the page reloads.

How is your page setup, is it just one frame?

Graham
Hi Graham,

The page uses just one frame and the page refreshes automatically
using a meta tag. I was thinking there might be a way using java
script which detects when a user has clicked the dropped down list and
if so set a cookie saying the user has currently selected that drop
down list. Then when the page is refreshed, you could see if that
cookie is set and if so onload set the drop down list to be displayed?
I don't know if I am thinking along the right lines though.

Thanks
Chris
Jun 27 '08 #3

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

Similar topics

3
by: julian | last post by:
hi I was wondering if anyone can help me out on this.... I have dynamcally populated a drop down menu with data from an access database using ASP. The values seem fine, however when i pass...
1
by: Jonathan LaRosa | last post by:
Anyone know how to do this with javascript? I'm trying to avoid creating two different forms because then changes become that much harder to manage. Thanks in advance . . . ~ Jon LaRosa jlarosa...
1
by: [Miren] | last post by:
Hello i have one great problem with one form. i must to know, for submmiting the form, if the user, has change the select, has select one or no. in my select i have: <select name="maquina" >...
4
by: Dan | last post by:
Can anyone offer suggestions on how to do this or if it is possible? I have a form that uses a drop down box and 2 text fields. What I am trying to do is have the value of each text box set by...
3
by: Yi Chen | last post by:
We have a drop down list on a PHP page, with several product names, and when people click one item, we will refresh the same page with the product name as parameter, and in turn we want to include...
11
by: satyanarayana49 | last post by:
Hi all, My page has a SELECT(drop-down list) element and i have to add options dynamically to it.Before adding i have to know whether that option is already there in the drop-down list. i...
1
by: sparksol | last post by:
I have a form with a drop down box. If you select an option in the drop down box (depending which option is selected) one or two textbox(es) and a submit button display. I would like to keep the...
1
by: bytesFTW99 | last post by:
I have been struggling with this for some time can anyone help out? just trying to have 3 dropdown boxes that fill depending on what is selected, then in some cases click a button and have the second...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.