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

List

P: n/a

Looking for function that made it simple to do with combo cox.

1. list_clear(combo_list)
This one is simple and easy to make it
2. list_add(combo_list,ix,str)
3. list_remove(combo_list,ix)
4. list_get_sel_index(combo_list)
5. list_set_sel_index(combo_list)

I think I can do with (1),(4) and (5) and maybe(3). But
(4) is little mysterious to me.
I looked at W3 and O'Reilly book and found nothing about
adding an item to the combo box.

Thanks.
Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Better but still clumpsy wrote:
Looking for function that made it simple to do with combo cox.

1. list_clear(combo_list)
This one is simple and easy to make it
2. list_add(combo_list,ix,str)
3. list_remove(combo_list,ix)
4. list_get_sel_index(combo_list)
5. list_set_sel_index(combo_list)

I think I can do with (1),(4) and (5) and maybe(3). But
(4) is little mysterious to me.
I looked at W3 and O'Reilly book and found nothing about
adding an item to the combo box.

#2:
combo_list.options[combo_list.options.length]=new Option(ix,str);
Where ix==value and str=text (or vv)
Mick
Jul 23 '05 #2

P: n/a

Thanks. It is working. And I can write the five functions.

Mick White <mw***********@rochester.rr.com> writes:
Better but still clumpsy wrote:
Looking for function that made it simple to do with combo cox.
1. list_clear(combo_list)
This one is simple and easy to make it
2. list_add(combo_list,ix,str)
3. list_remove(combo_list,ix)
4. list_get_sel_index(combo_list)
5. list_set_sel_index(combo_list)
I think I can do with (1),(4) and (5) and maybe(3). But
(4) is little mysterious to me.
I looked at W3 and O'Reilly book and found nothing about
adding an item to the combo box.

#2:
combo_list.options[combo_list.options.length]=new Option(ix,str);
Where ix==value and str=text (or vv)
Mick

Jul 23 '05 #3

P: n/a
Better but still clumpsy wrote:
Looking for function that made it simple to do with combo cox.

1. list_clear(combo_list)
This one is simple and easy to make it
2. list_add(combo_list,ix,str)
3. list_remove(combo_list,ix)
4. list_get_sel_index(combo_list)
5. list_set_sel_index(combo_list)

I think I can do with (1),(4) and (5) and maybe(3). But
(4) is little mysterious to me.
I looked at W3 and O'Reilly book and found nothing about
adding an item to the combo box.

Thanks.


I know your question was answered, but you might want to take a look at
these great examples, really nice code:

http://www.mattkruse.com/javascript/selectbox/
http://www.mattkruse.com/javascript/dynamicoptionlist/

Mike
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.