View Full Version : Selections from Drop Down Boxes Reset when trying to save webpage locally
01-06-2005, 10:26 PM
I have a website with many drop down boxes. So I'm using my webpage and making all the selections I want for the drop down boxes and then if I save the webpage to my harddrive, all the choices I made will be reset to the default selection automatically when I open the page again. Is there a way around this? CGI? Can anyone point me in the right direction, or better yet, tell me what I need to do to in order to be able to save the choices I made from my drop down boxes. Thanks in advance!
01-06-2005, 10:40 PM
if I save the webpage to my harddrive, all the choices I made will be reset to the default selection automatically when I open the page again.When you save a document, all you are retrieving is the mark-up not the state. To accomplish what you want, you'll have to edit the mark-up itself.
To give a select element a default value you must add a selected attribute to the appropriate option element:
<!-- Options -->
<option ... selected>...</option>
<!-- More options -->
 ...or elements if the multiple attribute is set on the select element.
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.