www.webdeveloper.com
Results 1 to 4 of 4

Thread: Select Boxes switched

  1. #1
    Join Date
    Aug 2008
    Posts
    40

    Smile Select Boxes switched

    I have a quick newbie question.

    Here's what I'm trying to do is...

    If you select a color, then select a shape, the color option would return to the 'selected' position.

    If you select a shape, then select a size, the shape option would return to the 'selected' position and so on.

    The end result is I would like to have only one item selected from one of the select boxes, with the other two select boxes returned to the selected position.

    The code is presented here.


    <html>
    <body>
    <h2>List Switch</h2>
    <p>Mauris egestas velit eu velit. Fusce at orci. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    </p>

    <select name='color'>
    <option selected='selected' value=''>Select Color</option>
    <option value='red'>Red</option>
    <option value='yellow'>Yellow</option>
    <option value='blue'>Blue</option>
    </select>

    <p>Curabitur ac odio. Praesent id dui ut urna elementum porttitor. Quisque convallis turpis nec risus.
    </p>

    <select name='shape'>
    <option selected='selected' value=''>Select Shape</option>
    <option value='square'>Square</option>
    <option value='circle'>Circle</option>
    <option value='oval'>Oval</option>
    </select>

    <p>Nulla nonummy aliquam diam. Duis odio turpis, sodales ut, laoreet vel, cursus quis, metus.
    </p>

    <select name='size'>
    <option selected='selected' value=''>Select Size</option>
    <option value='big'>Big</option>
    <option value='bigger'>Bigger</option>
    <option value='biggest'>Biggest</option>
    </select>


    </body>
    </html>

    Let me know if this doesn't make sense. Any help would be appreciated.

    Thanks...

  2. #2
    Join Date
    Oct 2009
    Posts
    46

    solution in another thread

    Check out this thread for your solution:

    http://www.webdeveloper.com/forum/sh...d.php?t=218110


    Two men enter, one man leaves.

    .--. .-. --- --. .-. .- -- -- . .-.
    chris brenz
    http://www.brenz.net/

  3. #3
    Join Date
    Aug 2008
    Posts
    40
    I appreciate the information. I have tried it, it works, but not every time. Not sure why, but I'm looking at it now...

    Thanks...

  4. #4
    Join Date
    Aug 2008
    Posts
    40

    resolved

    I do appreciate it. Made a minor tweak and it works.

    Thanks...
    ...

Thread Information

Users Browsing this Thread

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

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