Ver Mensaje Individual
  #5 (permalink)  
Antiguo 25/04/2007, 09:27
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Re: Valor de un list = a una caja de texto AYUDA!

Con Javascript puedes hacer algo asi:
Código:
<select name="valores" onchange="populateText(this);">
      <option value="1">Uno</option>
      <option value="2">Dos</option>
      <option value="3">Tres</option>
</select>
<input type="text" name="valorDesc" id="valorDesc" value="" />
<script type="text/javascript">
    function populateText(selObj) {
        var desc = document.getElementById( "valorDesc" );
        var texto = selObj.options[selObj.selectedIndex].text;
        desc.value = texto;
    }
</script>