What is the difference between a List Box and Combo Box?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    What is the difference between a List Box and Combo Box?

    at first let me clearify ....
    these (Combo BOX + List BOX) r two different components in html page?????

    i know how to develope combo box... but list boxxxxxx??????

    plz help me .......thanxxx in advance
  • AricC
    Recognized Expert Top Contributor
    • Oct 2006
    • 1885

    #2
    Originally posted by dmjpro
    at first let me clearify ....
    these (Combo BOX + List BOX) r two different components in html page?????

    i know how to develope combo box... but list boxxxxxx??????

    plz help me .......thanxxx in advance
    DMJ,
    I edited your thread title to be more descriptive. Also, I've put together an example to show you the difference, essentially you use the same tag.
    [html]
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>List Box/Combo Box Example</title>
    <style type="text/css">

    </head>
    <body>
    <h1>List Box</h1>
    <select size="4">
    <option>Item 1</option>
    <option>Item 2</option>
    <option>Item 3</option>
    <option>Item 4</option>
    <option>Item 5</option>
    <option>Item 6</option>
    <option>Item 7</option>
    <option>Item 8</option>
    <option>Item 9</option>
    </select>
    <br />
    <h1>Combo Box</h1>
    <select size="1">
    <option>Item 1</option>
    <option>Item 2</option>
    <option>Item 3</option>
    <option>Item 4</option>
    <option>Item 5</option>
    <option>Item 6</option>
    <option>Item 7</option>
    <option>Item 8</option>
    <option>Item 9</option>
    </select>
    </body>
    </html>
    [/html]

    Comment

    • KevinADC
      Recognized Expert Specialist
      • Jan 2007
      • 4092

      #3
      AricC probably figured out your question, but it's confusing because list box and combo box are not html form widgets at all, they are sort of slang terms used to describe the SELECT widget, or select menu. The attribute that allows a user to select more than one thing from the list is MULTIPLE

      <select size=3 multiple>

      but the sever side form processing script has to be able to process multi-valued form field data, other wise you get only one value anyway. Most good form processor scripts know how to do that, but if you are writing your own script you need to be aware of that.

      Comment

      • dmjpro
        Top Contributor
        • Jan 2007
        • 2476

        #4
        both of u thanxxxx

        Comment

        Working...