List Box Heading

J

jack-b

Hello,

How do I insert non-selectable headings into a list box?

e.g. if i had a list box displaying cities around the world - how could
i insert the country's name above each goup of cities

Australia (heading)
Sydney
Melbourne
New Zealand (heading)
Auckland
Wellington

Thanks!

Jack
 
J

Janwillem Borleffs

How do I insert non-selectable headings into a list box?

<select>
<optgroup label="Australia">
<option>Sydney</option>
<option>Melbourne</option>
</optgroup>
<optgroup label="New Zealand">
<option>Auckland</option>
<option>Wellington</option>
</optgroup>
</select>


JW
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top