473,385 Members | 1,772 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,385 software developers and data experts.

adding items to a list\menu

Ho can i add items to (the item label=visual text and the value=index
number) a list object on a website.

I am having a list with 4 items and i would like to add the text from a
textfield (textfield1.value) to the list object so it will hold 5 items.

thanks for any suggestions

Roy
The Netherlands
Jul 23 '05 #1
2 3252
On Mon, 5 Apr 2004 20:18:18 +0200, R.G. Vervoort
<ro**********@royvervoort.nl> wrote:
Ho can i add items to (the item label=visual text and the value=index
number) a list object on a website.

I am having a list with 4 items and i would like to add the text from a
textfield (textfield1.value) to the list object so it will hold 5 items.


This has been asked numerous times in the past. See (watch for wrap):

<URL:http://groups.google.com/groups?num=50&hl=en&lr=&ie=UTF-8&oe=UTF-8&q=adding+select+group%3Acomp.lang.javascript&btn G=Search>

Mike

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 23 '05 #2
"R.G. Vervoort" <ro**********@royvervoort.nl> wrote:
Ho can i add items to (the item label=visual text and the value=index
number) a list object on a website.


I have al ibrary of functions specifically for dealing with select lists,
and addOption is one of them:
http://www.mattkruse.com/javascript/selectbox/
(although that function in particular is rather trivial).

There are functions there to re-sort the list if you'd want to do that, too.

Base careful when adding new options - older browsers like Netscape4 will
not expand the size of the list box, so your new options may not be visible.

--
Matt Kruse
Javascript Toolbox: http://www.mattkruse.com/javascript/
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: DraguVaso | last post by:
Hi, I have a ComboBox of +- 15.000 items in it, via a DataSource. On Top of the Items-list, I want to add some values, based on a user choise (via a filter on the DataSource). Does anybody know...
4
by: DotNetJunky | last post by:
I have built a control that runs an on-line help system. Depending on the category you selected via dropdownlist, it goes out and gets the child subcategories, and if there are any, adds a new...
26
by: Simon Jefferies | last post by:
Hello, I am trying to add an item to a checked list box, like: clbList.Items.add("Hello",true) I get an error back: Run-time exception thrown: System.ArgumentOutOfRangeException -...
6
by: vb | last post by:
Hi, I am new to .Net. I am using a Combo Box in my windows forms. I am adding the items by creating the instances and adding the same to the list. My questions/doubts are: 1. If I have 25 to...
6
by: Papa.Coen | last post by:
I've just spend a lot of time solving the following problem: I used dotNet 2.0 / Visualstudio 2005 / C# / aspx, enable viewstate is set on all controls. I have 2 listboxes; the left contains items...
14
by: Paul_Madden via DotNetMonster.com | last post by:
Basically I have a listbox to which I add simple STRING items- I have a progress bar which I increment whenever I populate another portion of the complete set of items I wish to add. What I observe...
1
by: emilio1984 | last post by:
well hello, I've a question. I have 2 listmenu's. Listmenu 1 has option child and adult. Listmenu 2 has options black, and rose. Now here is the trick,,,
9
by: Kadett | last post by:
Hi all, I have following problem: I'm creating a ListView (Details) control at run-time and filling it with some records (let's say 10 000). This operation seems to be quite fast, but when I call...
2
by: =?Utf-8?B?TWFobW91ZCBTaGFiYW4=?= | last post by:
i have a problem in adding new listbox items i don't need to allow adding multible items with the same textvalue ex: if current items are: green red
1
by: gobblegob | last post by:
Hello Folks, I am searching a XML file for <Asset_Number> and then adding all children to DataGridView1, i can search but i dont know how to add item to the DataGridView Also my datagridview...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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,...

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.