473,396 Members | 2,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,396 software developers and data experts.

removing a menu item

Hi,

If a have a SELECT MULTIPLE element, represented by the javascript
variable, "myMenu", how would I remove the third item from the list
(assume there are more than 5 options)?

Thanks, - Dave

Jul 19 '06 #1
3 1139
la***********@zipmail.com said the following on 7/19/2006 12:18 PM:
Hi,

If a have a SELECT MULTIPLE element, represented by the javascript
variable, "myMenu", how would I remove the third item from the list
(assume there are more than 5 options)?
Assume? When is your homework assignment due?

The fact there are more than 5 options is irrelevant to the problem.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 19 '06 #2
You can use something like this function. Just pass the SELECT object
as first
argument and index to remove as second argument. Sorry for my bad
English.
/*******************************
This function is just for
ilustrate method ..
*******************************/
function myremoveItem(aSelectObj,aItemIndex)
{
if(aSelectObj.tagName != "SELECT")
return;
aSelectObj.remove(aItemIndex);
}
la***********@zipmail.com wrote:
Hi,

If a have a SELECT MULTIPLE element, represented by the javascript
variable, "myMenu", how would I remove the third item from the list
(assume there are more than 5 options)?

Thanks, - Dave
Jul 19 '06 #3
You can use something like this function. Just pass the SELECT object
as first
argument and index to remove as second argument. Sorry for my bad
English.
/*******************************
This function is just for
ilustrate method ..
*******************************/
function myremoveItem(aSelectObj,aItemIndex)
{
if(aSelectObj.tagName != "SELECT")
return;
aSelectObj.remove(aItemIndex);
}
la***********@zipmail.com wrote:
Hi,

If a have a SELECT MULTIPLE element, represented by the javascript
variable, "myMenu", how would I remove the third item from the list
(assume there are more than 5 options)?

Thanks, - Dave
Jul 19 '06 #4

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

Similar topics

2
by: VR | last post by:
I have a form with a list view control, a button control and a main menu with menuDelete item. Any time I am handling a button click event or menuDelete click event I call DeleteItem() function...
3
by: WhiteWizard | last post by:
I have an Windows app that allows users to save "bookmarks", on pages they have been to, and then navigate back to them. That all works. In addition, we have restricted them to 15 bookmarks, and if...
5
by: =?Utf-8?B?U2NhbmJveQ==?= | last post by:
Guyz, I want to remove items from the Solution Explorer. The VBE 2005 help system claims that to do this, you have to:- 1. Select the item you want to remove. 2. On the 'Edit' menu,...
13
by: Larry Bud | last post by:
Trying to conditionally remove menu items of the 2.0 .NET menu item control and I'm stumped. This removed a root level item: Menu1.Items.Remove(Menu1.FindItem("Administration")) But this...
0
by: jobs | last post by:
This works nice for removing a menu item. Menu.Items.Remove(Menu.FindItem("Admin")) But how would I remove a sub-menu item under that?
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
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
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...
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
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,...

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.