I need to get data from an input and move to a box! I have a cod that takes the data of a combo to play in a box!
cod:
function move(Origem, Destino)
{
var opt = document.createElement("option");
for(i = 0; i < Origem.options.length; i++)
{
if (Origem.options[i].selected && Origem.options[i].value != "")
{
if(w_seq_qtde[Origem.options[i].value]==0)
alert("sem periférico no estoque!");
else
{
document.getElementById("cb_MenuDestino").options.add(opt);
opt.text = Origem.options[i].text;
opt.value = Origem.options[i].value;
w_seq_qtde[Origem.options[i].value]--;
}
}
}
}
input:
<input type="text" name="tx_MenuOrigem" value="">
button:
<input type="button" onClick="move(this.form.tx_MenuOrigem,this.form.cb_MenuDestino)" value="+++">
select:
<select multiple size="7" name="cb_MenuDestino" style="width:300"></select>
In this case when you select the item in the combo and press on a button to add it plays in the box! But I want to get the data in an input and play inside the box! If possible, how can it be more or less similar to a better understanding ?! Thanks to those who help!