473,402 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

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 1327
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jeffrey Silverman | last post by:
Hi, all. I have a linked list. I need an algorithm to create a tree structure from that list. Basically, I want to turn this: $list = array( array( 'id' => 'A', 'parent_id' => null, 'value'...
13
by: querypk | last post by:
If this is the list. values = as we can see there are peaks in the list.that is 0,72,0 is a group(triangle) with peak 72.then 0, 4, 9, 2, 0, 0 with peak 9 and 0, 42, 26, 0 with...
19
by: William Wisnieski | last post by:
Hello Everyone, I have a main form with a datasheet subform that I use to query by form. After the user selects two criteria on the main form and clicks the cmdShowResults button on the main...
90
by: Christoph Zwerschke | last post by:
Ok, the answer is easy: For historical reasons - built-in sets exist only since Python 2.4. Anyway, I was thinking about whether it would be possible and desirable to change the old behavior in...
9
by: zacks | last post by:
I have written a serialized class that has several properties that are typed as a list of type class. When I deserialize an XML file, the list is populated just fine. But I am having trouble...
5
by: Little | last post by:
I have this program and I need to work on the test portion, which tests if a Val is in the list. It returns false no matter what could you look at the part and see what might need to be done to fix...
1
by: dinoo | last post by:
I would appreciate if some one could help me on this. I have a list box where I would like to display Company Name and Number by conctaening them. For example - Abc 1 Bii 1 While...
0
by: cindy | last post by:
I have a dynamic datagrid. I have custom classes for the controls public class CreateEditItemTemplateDDL : ITemplate { DataTable dtBind; string strddlName; string strSelectedID; string...
4
by: Guilleuss | last post by:
Hi, In the alligned memory allocation post (a quite good article indeed). Christian Bau suggests the following: char* p = calloc (bytes + alignment + sizeof (void *)); char* q = p + sizeof...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.