Ver Mensaje Individual
  #20 (permalink)  
Antiguo 19/06/2009, 11:31
Avatar de David
David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años, 10 meses
Puntos: 839
Respuesta: Reemplazar campos.

Mira, la idea es esta:
Código html:
Ver original
  1. <span id="stipo"></span><select id="tipo">...</select>
Así, no necesitas usar el replaceChild. Sólo cuando quieras mostrar el texto haz esto:
Código javascript:
Ver original
  1. var texto = document.getElementById("stipo");
  2. var lista = document.getElementById("tipo");
  3. texto.innerHTML = lista.value;
  4. texto.style.display = "block";
  5. lista.style.display = "none";
Y cuando quieras volver a mostrar la lista, ocultas el texto y muestras la lista (cambiando su estilo display), ¿se entiende?
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.