• Advertisement
Sign in to follow this  

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

This topic is 1299 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