www.webdeveloper.com
Results 1 to 7 of 7

Thread: Make drop down the same as another?

Threaded View

  1. #1
    Join Date
    Jan 2008
    Location
    ncl,uk
    Posts
    56

    Question Make drop down the same as another?

    If i have in HTML:
    <select id="mainDropDown">
    <option value="Default">Select county</option>
    </select>

    <select id="dropDown1">
    <option value="Avon">Avon</option>
    <option value="Whatever">Whatever</option>
    </select>

    And i want to make the mainDropDown have the same options as dropDown1 what is the best way to do this? I tried just assigning the mainDropDown= dropDown1 element but this doesnt work. Is my only option to delete the children of mainDropDown, store the dropDown1 elements in an array and then re-create the elements of mainDropDown in a for loop?
    If so how do i delete a child and also create another?
    Last edited by sekter; 05-10-2010 at 07:35 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles