2
Well, I want to pass on the values I put on <input>
to the "box"
and also have the option to take it.
Example:
<table border="1" align="center" height="180">
<tr>
<td> <font face="arial" align="center" valign="middle" color="blue" size="-1">PATRIMÔNIO</font></br>
<input type="text" name="tx_MenuOrigem" maxlength="16" size="16" style="font-size:11; color:Black;" onkeypress="return SomenteNumero(event);" value="">
<input type="button" onClick="move(this.form.tx_MenuOrigem,this.form.cb_MenuDestino)" value=">>">
<br>
<select multiple size="9" name="cb_MenuDestino" style="width:300"></select>
<br>
<input type="button" align="center" valign="middle" onClick="tira(this.form.cb_MenuDestino)" value="<<">
<br>
</td>
<td align="center" valign="middle" width="15%">
<br>
</td>
<td> <font face="arial" align="center" valign="middle" color="blue" size="-1">SERIAL</font>
</br>
<input type="text" name="cb_MenuOrigem2" maxlength="16" size="16" style="font-size:11; color:Black;" onkeypress="return SomenteNumero(event);" value="">
<input type="button" onClick="move(this.form.cb_MenuOrigem2,this.form.cb_MenuDestino2)" value=">>">
<br>
<select multiple size="9" name="cb_MenuDestino2" id="cb_MenuDestino2" style="width:230"></select>
<br>
<input type="button" align="center" valign="middle" onClick="tira(this.form.cb_MenuDestino)" value="<<">
<br>
</td>
</tr>
</table>
Example in JSF: Example code
In JSF I left an example with a function
, more or less what it should do. In the case of function
in JSF, the user selects the option to popular the other box).
has to be in pure javascript? if using jquery makes the work much easier and works in any browser...
– Jader A. Wagner
@Jader, it can be in jquery, as long as you solve my problem if possible!
– Felipe
It’s not difficult just with javascript... http://www.johnwbartlett.com/cf_tipsntricks/index.cfm?TopicID=86
– Enoque Duarte