General discussion

Locked

java script

By vidhyasrider ·
how to add combobox with more than one item
o transfer to another combo box by clicking one

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

java script

by andrew In reply to java script

Here's one way using DHTML:

<HTML>
<BODY>

<select id=first onClick='JavaScript:AddItem();'>
<option value=1>One</option>
<option value=2>Two</option>
<option value=3>Three</option>
<option value=4>Four</option>
<option value=5>Five</option>
</select>

<select id=second>
</select>

</BODY>

<script language=JavaScript>
function AddItem()
{
var newOption=document.createElement('OPTION');
newOption.text=first.options[first.options.selectedIndex].text;
newOption.value=first.options[first.options.selectedIndex].value;
second.options.add(newOption);
}
</script>

</HTML>

Collapse -

java script

by vidhyasrider In reply to java script

The question was auto-closed by TechRepublic

Collapse -

java script

by GIJoe In reply to java script

Is this still a problem?

Collapse -

java script

by vidhyasrider In reply to java script

The question was auto-closed by TechRepublic

Collapse -

java script

by vidhyasrider In reply to java script

This question was auto closed due to inactivity

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums