Advertisement Jump to content
Sign in to follow this  
Brainx7

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

This topic is 1664 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!