answersLogoWhite

0

This can be done with a little javascript. Here's an example <html>

<head>

<script type="text/javascript" language="javascript">

function addNewItem()

{

// Retrieve the elements from the document body

var textbox = document.getElementById('MyTextbox');

var listbox = document.getElementById('MyListbox'); // Now we need to create a new 'option' tag to add to MyListbox

var newOption = document.createElement('option');

newOption.value = textbox.value; // The value that this option will have

newOption.innerHTML = textbox.value; // The displayed text inside of the <option> tags // Finally, add the new option to the listbox

listbox.appendChild(newOption);

}

</script>

</head> <body> <input id="MyTextbox" type="textbox" />

<input type="button" value="Add Item" onclick="javascript:addNewItem()" /> <br /><br /> <select id="MyListbox" size="10">

<option value="apples">Apples</option>

<option value="Oranges">Oranges</option>

<option value="bananas">Bananas</option>

</select> </body>

</html>

User Avatar

Wiki User

17y ago

What else can I help you with?

Continue Learning about Engineering

How do you add verification steps to tests?

we can add verification steps through various Checkpointsin QTPWe can also verify the script through VerifyFilemethod.


What does the word Graft mean?

It means to add something to another to form one new item. Typically used in surgery to add tissue from one part of the body to cover a damaged area.


What is the Difference between combo box and list box in visual basic?

LISTBOX CONTROLCOMBOX CONTROLA LISTBOX CONTROL displays a list of items from which theuser can select one or more. If the number of items exceeds the number that can be displayed, a scroll bar is automatically added to the List Box control.a list box is appropriate when you want to limit input to what is on the listchoices not on the list can be typed in this field.A COMBOX CONTROL combines the features of a text box and a list box. This control allows the user to select an item either by typing text into the combo box, or by selecting it from the list.a combo box is appropriate when there is a list of suggested choicesA combo box contains an edit field.


Write an algorithm to insert an item to a given location in sorted array?

To insert a number N into array A at index I: // Resize A if necessary If A is too small to add a new element then resize A // Right-shift all elements starting from position I For i = A.length to I A[i] = A[i - 1] // Insert new item A[I] = N


How do you use string in visual basic?

A string is a data set in the form of alphanumeric characters and symbols. For example, if you wanted to use a string to concatenate and display a welcome message displaying a user's name, your code would look something like this: Dim WelcomeMessageString as String = "Welcome to the string demonstration " Dim FormResponseString as String = form1.text Message(WelcomeMessageString + FormResponseString)

Related Questions

What are the correct steps for inserting a textbox in PowerPoint?

To insert a textbox in PowerPoint, first, open your presentation and navigate to the slide where you want to add the textbox. Then, click on the &quot;Insert&quot; tab in the ribbon at the top, and select &quot;Textbox&quot; from the dropdown menu. Click and drag on the slide to draw the textbox to your desired size, and then you can type your text inside it. Finally, you can format the textbox using the options in the &quot;Format&quot; tab.


How do you add a sound in a textbox in PowerPoint presentation?

You can add a text box easily in Power point. Along with the text box, there is an option for adding sound also.


How do you add things to your cart at target com?

When you want an item put your curser on the button "add to cart" and do that with each item until done.


How do you create notepad in vbnet?

Create a new form and put a textbox in it. Et voila. You can add extra things like change font, size, word wrap, find/replace, print etc.. but bear in mind that you cannot change colour in a textbox. Well, you can but if you want to save it - you need to save it as a .RTF document so it saves the styles (bold, italic, colour etc.) - so i would use a richtextbox instead of a textbox.


What does it mean to add?

It means you are taking one number or item and adding it to another item or number.


How do you favourite a story on Harry Potter fanfiction?

You did not specify the web-site.On fanfiction.net it is easy: if you are a registered user, you will find a listbox at the end of the chapter/story, the first options is "Add Story to Favorites", so you only have to click button Go.


How do you find the total cost of a item with tax?

First you calculate the amount of the tax on the item. Then you add together the original cost of the item and the tax.


What happens when you add a 25TH item to the office clipboard?

nothhing


What happens when you add the 25th item to the office clipboard?

nothhing


How do you add items to your giftlist on IMVU?

If you're in the shop window of the imvu client and you see an item that you want to add to your giftlist, simply click on the item and at the bottom of the popup window there will be a "more info: link. When you click that it will bring you to the IMVU product page and you can simply click the "add to giftlist" link under the item.


How do you write a java program to find the tax on the item and the item's total cost?

You simply multiply the tax rate with the item's original cost and divide by hundred, to get the tax. Then you add that to the original cost, to get the total cost. In Java you use + to add, * to multiply, and / to divide.


How do you make add to my basket?

To add items to your basket, simply click on the &quot;add to basket&quot; or &quot;add to cart&quot; button next to the item you want to purchase. The item will then be placed in your virtual shopping basket for checkout. You can continue browsing and adding more items before proceeding to complete your purchase.

Trending Questions
What DOES MTO stands for in piping design? How much would it cost to rebuild the effects of a tsunami? What is document.getElementById in javascript? You have got 75089 rank in uptu and after obc quota and army field quota you have got 827 so which college will be preffered you for doing electronics and telecom engineering in uptu? Write a shell program to check and display 10 leap years? What are the contribution of Dr Ramon Gustilo? What is definition of transverse shear? Which transducer converts heat energy in to electrical? What a process that combines a variety of materials or objects to create a sculpture? What could be the reason the toilet doesn't flush that has a septic system? What is the term used to describe an organization in which positions are awarded based on one's ability and skill? I'm looking for ways to reduce energy consumption in an office installation. How easy is it to install a lighting control system. A basic commercial solution would be adequate? What are twenty-five inventions that did not exist a hundred years ago? What is the best fuel for a hot water boiler heating system gas or fuel oil? If the voltage impressed across a circuit is constant but the resistance increases by a factor of 7 By what factor does the current change? Why is series resistor in all experiment necessary? What does signal mean? Is BS 1387 steel equivalent to ANSI Schedule 40 steel? What is qualification and resposnsibility of system analyst? How do you control lights using scr?