Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/02/2008, 15:36
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: Actualizar Combobox sin refrescar pagina

Lo que puedes hacer es via JavaScript crear el elemento en el combobox:
Código:
<script type="text/javascript">
function insertaACombo( combo ) {
        var txt = prompt( "Define el nuevo valor" );
        combo.options[combo.options.length] = new Option( txt );
}

function agrega() {
        var combo = document.getElementById( "combo1" );
        insertaACombo( combo );
}
</script>

<select name="cb1" id="combo1">

</select>
<button onclick="agrega()">Agregar</a>
Saludos.