| Usuario |
Select Box Onchange |
Desconocido
|
| Enviado - 18/8/2004 |
| |
Necesito pasar el contenido (no el valor) de un selectbox a un textbox, me dan una mano?
gracias |
| |
|
nostromo
389 Mensaje(s)
|
| Enviado - 19/8/2004 |
| |
Hola;
La unica manera:
<script language="JavaScript" type="text/javascript">
//change contents of message box, where the first one corresponds with the first drop down box, second with second box etc
var combo=new Array()
combo[0]='primera'
combo[1]='segunda'
combo[2]='tercera'
combo[3]='cuarta'
function changecontent(which)
{
document.cuerpo.box.value=combo[which.selectedIndex]
}
document.cuerpo.box.value=combo[document.cuerpo.selectbox.selectedIndex]
</script>
en el body:
<form name="cuerpo">
<select name="selectbox" size="1" onChange="contenido(this)">
<option selected>uno
<option>dos
<option>trés
<option>cuatro
</select>
</form>
Nos vemos. |
| |
|
|
|