By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,269 Members | 1,332 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,269 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.