Results 1 to 10 of 10

Thread: Need drop down help..PLEASE

  1. #1
    Join Date
    Nov 2006
    Location
    Illinois
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool Need drop down help..PLEASE

    I am trying to make a drop down with colors for the end user to be able to pick a color. I have the colors up on the page www.easyorderform.com/form I am just trying to make the drop down of colors and I am stuck, and I do not have Flash, however I do have Fireworks. Any suggestions, please help a newbie to the internet.
    Thanks

  2. #2
    Join Date
    Nov 2006
    Location
    Illinois
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    Default

    The select element, or rather its option element children, may only contain text. You would be better off using radio buttons. You should also give appropriate alternative text to all of those images ("Lime", "Gold", "Sapphire", and so on).

    The image at the start is excessively wide and causes a horizontal scrollbar, here. All upper-case letters are recognised for being harder to read than lower- or mixed-case; consider rewriting the relevant parts. Use labels: don't place the label as default content in form controls.

    Mike

  4. #4
    Join Date
    Nov 2006
    Location
    Illinois
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by mwinter
    The select element, or rather its option element children, may only contain text. You would be better off using radio buttons. You should also give appropriate alternative text to all of those images ("Lime", "Gold", "Sapphire", and so on).

    The image at the start is excessively wide and causes a horizontal scrollbar, here. All upper-case letters are recognised for being harder to read than lower- or mixed-case; consider rewriting the relevant parts. Use labels: don't place the label as default content in form controls.

    Mike
    Those pictures are actually all separate, is there anyway to make a drop down, whether it is in flash, or another language?? Even if it is like the colors pallete that they have here.

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

    Default

    Quote Originally Posted by Lovergirl
    Those pictures are actually all separate,
    I'm aware of that.

    is there anyway to make a drop down, whether it is in flash, or another language??
    And still have it submit the choice? Reliably? Not in Flash. With some effort, it could be scripted, but you'd still have to use radio buttons, anyway, for the fall back.

    Even if it is like the colors pallete that they have here.
    That is an aid, not a necessity.

    Mike

  6. #6
    Join Date
    Nov 2006
    Location
    Illinois
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    MWinters,
    I appreciate your feedback I really do. However in this quick reply box where you can change the color, is there anyway to get a drop down box like this one??

  7. #7
    Join Date
    Aug 2006
    Posts
    239
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well, you might use something like suckerfish menu (that is a list disguised as dropdown- avaliable at DD among many others) with simple JS backend to store selected variable to be passed as order, like
    Code:
    <li><img src="magenta.gif" onclick="colorValue= 'magenta';hideMenu()"></li>

  8. #8
    Join Date
    Nov 2006
    Location
    Illinois
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The only probelm with that is I want the end user to pick the color to send it back to me on a form. Basically I am trying to make it where the user enters basic info(address, phone, ect, and then picks the product that they want, including the color. So basically I want the info that they enter in to be sent back to me. So I can contact them, check out what I have, www.easyorderform/form.html

  9. #9
    Join Date
    Nov 2006
    Location
    Illinois
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

  10. #10
    Join Date
    Aug 2006
    Posts
    239
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yes, we know, and the color the user chooses will in in the form, however it will be selected from a non <select> menu, and filled in by simple javascript function.
    Code:
    <input type="hidden" id="color">
    <ul id="suckerfish">
       <li>Currently selected color: <span id="preview">none</span>
       <ul id="menu">
          <li><img src="magenta.gif" onclick="setColorValue('magenta');"></li>
          <li><img src="orange.gif" onclick="setColorValue('orange');"></li>
       </ul></li>
    </ul>
    <script type="text/javascript">
    function setColorValue(value) {
        var colorValueField = document.getElementById('color');
        var previewObject = document.getElementById('preview');
    
       if (colorValueField) colorValueField.value = value;
       if (previewObject) previewObject.innerHTML = "<img src=\"" + value +".gif\"> "+ value;
    
       hideMenu()
    }
    
    function hideMenu() {
       var menuObj = document.getElementById('menu');
      if (menuObj && menuObj.style) menuObj.style.display = "none";
    }
    </script>
    This is a crummy, but working script (I hope someone will come with an optimized version), you'll need to integrate it into your page.
    A few assumptions are made:
    1) images are gifs, and their names represent color "value".
    2) you might want to integrate suckerfish (or other CSS based) menu (of course, this will work even without the suckerfish menu, when you just attach onclick event to images, yet IMHO it will look better, and you wanted a "dropdown")...
    Last edited by ItsMeOnly; 11-09-2006 at 10:01 PM.

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
  •