list box values to be alligned  
Author Message
Regena





PostPosted: 2006-1-19 8:38:00 Top

java-programmer, 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..

 
McKirahan





PostPosted: 2006-1-19 11:32:00 Top

java-programmer >> list box values to be alligned "Regena" <email***@***.com> wrote in message
news:email***@***.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>



 
Thomas 'PointedEars' Lahn





PostPosted: 2006-1-20 1:32:00 Top

java-programmer >> list box values to be alligned 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
 
 
McKirahan





PostPosted: 2006-1-20 1:52:00 Top

java-programmer >> list box values to be alligned "Thomas 'PointedEars' Lahn" <email***@***.com> wrote in message
news:email***@***.com...
> 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/tags/bltags-optgroup.htm


 
 
Thomas 'PointedEars' Lahn





PostPosted: 2006-1-20 4:55:00 Top

java-programmer >> list box values to be alligned McKirahan wrote:

> "Thomas 'PointedEars' Lahn" <email***@***.com> 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