Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/11/2008, 23:02
moyao_84
 
Fecha de Ingreso: noviembre-2008
Mensajes: 2
Antigüedad: 15 años, 6 meses
Puntos: 0
Respuesta: listbox dinamico

yo tengo algo parecido pero implemetado con php por ci te sirve
Código:
$conn=Conectar();
	$sql="SELECT * FROM edo ORDER BY `id_edo` ASC";
	$result=mysql_query($sql,$conn);
	while($reg=mysql_fetch_array($result)){
		//tecnolgia DOM
		echo '
			<script>
				var objectList = document.getElementsByTagName("select")[0];
				var objetListOption = document.createElement("option");
 				objetListOption.setAttribute("value", "'.$reg['id_edo'].'");
				var objectText = document.createTextNode("'.$reg['edo'].'");
 				objetListOption.appendChild(objectText);
 				objectList.appendChild(objetListOption);
			</script>
		';
hay nos cuentan si les sirvio.. bye