
16/11/2004, 10:18
|
 | | | Fecha de Ingreso: julio-2003
Mensajes: 83
Antigüedad: 21 años, 8 meses Puntos: 1 | |
ayuda con listas desplegables hola amigos encontre el siguiente codigo, aquie ne este foro, pero quisiera saber como puedo enviar los datos seleccionados a la base de datos , aqui les pongo el codigo :
<html>
<head>
<title>Documento sin título</title>
<script language="javascript" type="text/javascript">
/************************************************
*************************************************/
function slctr(texto,valor){
this.texto = texto
this.valor = valor
}
var conferencia1=new Array()
conferencia1[0] = new slctr('- -Ponentes- -')
conferencia1[1] = new slctr("Ing Tecocha",'salon1')
conferencia1[2] = new slctr("Ing vargas",'salon2')
var conferencia2=new Array()
conferencia2[0] = new slctr('- -Ponentes- -')
conferencia2[1] = new slctr("iNG sANDOVAL",'salon')
var conferencia3=new Array()
conferencia3[0] = new slctr('- -Ponentes- -')
conferencia3[1] = new slctr("iNG sANDOVAL",'salon2')
//*******Nietos*******************
var salon = new Array()
salon[0] = new slctr('- -Salón- -')
salon[1] = new slctr("salon A",null)
var salon1 = new Array()
salon1[0] = new slctr('- -Salón- -')
salon1[1] = new slctr("salon b",null)
var salon2 = new Array()
salon2[0] = new slctr('- -Salón- -')
salon2[1] = new slctr("salon c",null)
var dormitorio = new Array()
dormitorio[0] = new slctr('- -Dormitorio- -')
dormitorio[1] = new slctr("cama",null)
dormitorio[2] = new slctr("mesita" ,null)
function slctryole(cual,donde){
if(cual.selectedIndex != 0){
donde.length=0
cual = eval(cual.value)
for(m=0;m<cual.length;m++){
var nuevaOpcion = new Option(cual[m].texto);
donde.options[m] = nuevaOpcion;
if(cual[m].valor != null){
donde.options[m].value = cual[m].valor
}
else{
donde.options[m].value = cual[m].texto
}
}
}
}
</script>
</head>
<body>
<form name="form1" method="post" action="grabaconferencias.php">
<select name="select" onchange="slctryole(this,this.form.select2)">
<option >- - Conferencia - -</option>
<option value="conferencia1">Modelo de Negocio del Sofware Libre</option>
<option value="conferencia2">balance Scorecard</option>
<option value="conferencia3">Incubadora de Empresas de Software</option>
</select>
<select name="select2" onchange="slctryole(this,this.form.select3)">
<option>- - - - - -</option>
</select>
<select name="select3">
<option>- - - - - -</option>
</select>
</form>
</body>
</html> |