473,399 Members | 3,106 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,399 software developers and data experts.

List


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
3 1050
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

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

Similar topics

6
by: massimo | last post by:
Hey, I wrote this program which should take the numbers entered and sort them out. It doesnąt matter what order, if decreasing or increasing. I guess I'm confused in the sorting part. Anyone...
10
by: Kent | last post by:
Hi! I want to store data (of enemys in a game) as a linked list, each node will look something like the following: struct node { double x,y; // x and y position coordinates struct enemy...
24
by: Robin Cole | last post by:
I'd like a code review if anyone has the time. The code implements a basic skip list library for generic use. I use the following header for debug macros: /* public.h - Public declarations and...
4
by: JS | last post by:
I have a file called test.c. There I create a pointer to a pcb struct: struct pcb {   void *(*start_routine) (void *);   void *arg;   jmp_buf state;   int    stack; }; ...
3
by: chellappa | last post by:
hi this simple sorting , but it not running...please correect error for sorting using pointer or linked list sorting , i did value sorting in linkedlist please correct error #include<stdio.h>...
0
by: drewy2k12 | last post by:
Heres the story, I have to create a doubly linked list for class, and i have no clue on how to do it, i can barely create a single linked list. It has to have both a head and a tail pointer, and...
10
by: AZRebelCowgirl73 | last post by:
This is what I have so far: My program! import java.util.*; import java.lang.*; import java.io.*; import ch06.lists.*; public class UIandDB {
0
by: Atos | last post by:
SINGLE-LINKED LIST Let's start with the simplest kind of linked list : the single-linked list which only has one link per node. That node except from the data it contains, which might be...
12
by: kalyan | last post by:
Hi, I am using Linux + SysV Shared memory (sorry, but my question is all about offset + pointers and not about linux/IPC) and hence use offset's instead on pointers to store the linked list in...
7
by: QiongZ | last post by:
Hi, I just recently started studying C++ and basically copied an example in the textbook into VS2008, but it doesn't compile. I tried to modify the code by eliminating all the templates then it...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.