469,312 Members | 2,464 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,312 developers. It's quick & easy.

list box values to be alligned

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
4 1235
"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
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
"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
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.

Similar topics

5 posts views Thread by Jeffrey Silverman | last post: by
13 posts views Thread by querypk | last post: by
90 posts views Thread by Christoph Zwerschke | last post: by
9 posts views Thread by zacks | last post: by
5 posts views Thread by Little | last post: by
1 post views Thread by dinoo | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.