I have a <select> on my page.
When you select an option from this select the form submits and the page reloads.
Now I want only when you enter for the first time the page to have a preselected option but when you select an option from the select it should remain the option you selected even if the page reloads.
Is this possible with javascript?
I have a <select> on my page. When you select an option from this
Share
The client does not remember the previus state of the page. So the selected value will be missed after the postback.
If you can modify the server side code then you can post the selected value back and forth: when the page reload, the value is again available to the client.