Jump to content

  • Log In with Google      Sign In   
  • Create Account

How do yo retain a selection from a drop down list when refreshing in php


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Brainx7   Members   -  Reputation: 124

Like
0Likes
Like

Posted 30 June 2014 - 07:54 AM

and I don't mean like on submit with a submit function or button, I mean by just going to the refresh button of the browser and refreshing the website, I want the selection I made to show, if you could please show me a simple example that would be great



Sponsor:

#2 DiegoSLTS   Members   -  Reputation: 1897

Like
2Likes
Like

Posted 30 June 2014 - 08:10 AM

It's like the other thread you opened about the checkboxes. You need JavaScript, store the "select" value in localStorage or sessionStorage when the selection changes, and (also with JavaScript), on the document ready event read the localStorage/sessionStorage and set the <option> tag to selected based on the value that was stored.



#3 Brainx7   Members   -  Reputation: 124

Like
0Likes
Like

Posted 30 June 2014 - 09:47 AM

I found a solution smile.pnghttp://jsfiddle.net/3HxCF/257/

thanks for your help diego


Edited by Brainx7, 30 June 2014 - 09:48 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS