By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 971 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

list box values to be alligned

P: n/a
hi,
my list box in the html page contains list box with values. these
values inturn have subvalues and I have to allign the child values to
right so that i can know the parent of the values. how can I do that.
list values should look something like this...
(suppose u have a list box with the state names in usa. the cities of
the states would be the child elements and the state names would be the
parent values)

ALABAMA
Abbeville
Huntsville
Birmingham
Montgomery
......
ALASKA
Anchorage
Tucson
.....
........
.........
.........

Urgent can someone help pls. I can use java script or any java
technology

thanks..

Jan 19 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"Regena" <rc******@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
hi,
my list box in the html page contains list box with values. these
values inturn have subvalues and I have to allign the child values to
right so that i can know the parent of the values. how can I do that.
list values should look something like this...
(suppose u have a list box with the state names in usa. the cities of
the states would be the child elements and the state names would be the
parent values)

ALABAMA
Abbeville
Huntsville
Birmingham
Montgomery
......
ALASKA
Anchorage
Tucson
.....
.......
........
........

Urgent can someone help pls. I can use java script or any java
technology

thanks..


<select>
<option> ALASKA
<option> . . . . Anchorage
<option> . . . . Tucson
</select>

Jan 19 '06 #2

P: n/a
Regena wrote:
my list box in the html page contains list box with values. these
values inturn have subvalues and I have to allign the child values to
right so that i can know the parent of the values. how can I do that.


Use the `optgroup' element.
PointedEars
Jan 19 '06 #3

P: n/a
"Thomas 'PointedEars' Lahn" <Po*********@web.de> wrote in message
news:29****************@PointedEars.de...
Regena wrote:
my list box in the html page contains list box with values. these
values inturn have subvalues and I have to allign the child values to
right so that i can know the parent of the values. how can I do that.


Use the `optgroup' element.


However, it requires a current browser like NS6+, IE6, FF.

<select>
<option>Pick a city...
<optgroup label="ALASKA"> ALASKA
<option>Anchorage
<option>Tucson
</optgroup>
</select>

http://webdesign.about.com/library/t...s-optgroup.htm
Jan 19 '06 #4

P: n/a
McKirahan wrote:
"Thomas 'PointedEars' Lahn" <Po*********@web.de> wrote [...]:
Regena wrote:
> my list box in the html page contains list box with values. these
> values inturn have subvalues and I have to allign the child values to
> right so that i can know the parent of the values. how can I do that. Use the `optgroup' element.


However, it requires a current browser like NS6+, IE6, FF.


That is not quite correct. The `optgroup' element is defined in HTML 4.01,
the latest version of HTML 4, (published in December 1999) and therefore
supported by _any_ Gecko-based UA. (It is rather a shame that the element
is not available in IE before version 6, released in October 2001.)
<select>
<option>Pick a city...
<optgroup label="ALASKA"> ALASKA
<option>Anchorage
<option>Tucson
</optgroup>
</select>


This is not Valid. It has to be

<select>
<option>Pick a city...</option>
<optgroup label="ALASKA">
<option>Anchorage</option>
<option>Tucson</option>
</optgroup>
</select>

where the close tag of the `option' element is of course optional in HTML,
however no text node is allowed after the start tag of the `optgroup'
element.
PointedEars
Jan 19 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.