Results 1 to 2 of 2

Thread: Selections from Drop Down Boxes Reset when trying to save webpage locally

  1. #1
    Join Date
    Jan 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Selections from Drop Down Boxes Reset when trying to save webpage locally

    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!

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by needname
    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[1]:

    HTML Code:
    <select ...>
      <!-- Options -->
      <option ... selected>...</option>
      <!-- More options -->
    </select>
    Mike


    [1] ...or elements if the multiple attribute is set on the select element.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •