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

Started by
1 comment, last by Brainx7 9 years, 9 months ago

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

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.

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

thanks for your help diego

This topic is closed to new replies.

Advertisement