Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   list box values to be alligned (http://www.velocityreviews.com/forums/t922473-list-box-values-to-be-alligned.html)

Regena 01-19-2006 12:40 AM

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 01-19-2006 03:32 AM

Re: list box values to be alligned
 
"Regena" <rchekuri@gmail.com> wrote in message
news:1137631249.723952.285160@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>




Thomas 'PointedEars' Lahn 01-19-2006 05:32 PM

Re: 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 01-19-2006 05:52 PM

Re: list box values to be alligned
 
"Thomas 'PointedEars' Lahn" <PointedEars@web.de> wrote in message
news:2929764.v3VpII8NKM@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



Thomas 'PointedEars' Lahn 01-19-2006 08:55 PM

Re: list box values to be alligned
 
McKirahan wrote:

> "Thomas 'PointedEars' Lahn" <PointedEars@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


All times are GMT. The time now is 08:49 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.