Formatting data in select box help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bning
    New Member
    • Aug 2007
    • 8

    Formatting data in select box help

    Hi.

    I really need some html help. The basic gist of what I need to do is to place several columns of data in a select box so it's readable.

    Ideally I would use a table like so (would be many rows in the real appliaction) :

    Code:
    <table>
    <select name="something" size="10">
    <option value="w"><tr><td>name</td><td>price</td></tr></option>
    </select>
    </table>
    However this results in the data being shown outside of the text box. Is there an way to achieve this effect?

    Thanks,

    Ben.
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    You don't have the table set up correctly and no values for the options. Look at this to get started.
    [HTML]
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="content-type"
    content="text/html;charset=ut f-8">

    <style type="text/css">

    </style>

    </head>
    <body>
    <table>
    <tr width="20">
    <td>
    <select name="something " size="10">
    <option value="w">numbe r one</option>
    </select>
    </td>
    <td>
    name
    </td>
    <td>price</td></tr>
    </table>
    </body>
    </html>
    [/HTML]

    Comment

    • bning
      New Member
      • Aug 2007
      • 8

      #3
      Thanks for your reply but thats not really what I had in mind. What I'd ideally like is for each selectable line in a select box be composed of a table row, 1 row deep by three columns. So in the finished select box we'd see several products on individual rows, along with their product number and price, these three fields in columns.

      This may not be possible but is there a way to achieve a similar effect?

      Ben.

      Comment

      Working...