Foros del Web » Programando para Internet » Javascript »

Mas sobre popups

Estas en el tema de Mas sobre popups en el foro de Javascript en Foros del Web. Hola, tengo que cargar 6 datos en un form, obteniendo combinaciones de opciones de 3 popups . Solo obtengo los valores del primer popups, y ...
  #1 (permalink)  
Antiguo 06/02/2005, 07:00
jlc
 
Fecha de Ingreso: julio-2003
Ubicación: Capital
Mensajes: 17
Antigüedad: 20 años, 9 meses
Puntos: 0
Mas sobre popups

Hola, tengo que cargar 6 datos en un form, obteniendo combinaciones de opciones de 3 popups.
Solo obtengo los valores del primer popups, y no de los otros.
El tema es que debería ser variable y no lo es... no lo he podido hacer.
Necesito de su ayuda, dado que NO soy un experto en el tema.
Aca va el codigo del form y los tres popups... sé que parece largo pero no lo es... gracias.

uno.asp

<td valign="top"><form name="form1" onSubmit="return validar(this)" method="post" action="dos.asp" enctype="multipart/form-data">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>Apellido:</td>
<td><input name="Apellido" type="text" size="30"></td>
<td>Nombre:</td>
<td><input name="Nombre" type="text" size="30"></td>
</tr>
<tr>
<td colspan="4"><tr>
<td width="150"><a href="" onClick="window.open('pu1.htm','','width=300,heigh t=300');return false;">PopUp1</a></td>
<td width="150"><a href="" onClick="window.open('pu2.htm','','width=300,heigh t=300');return false;">PopUp2</a></td>
<td width="150"><a href="" onClick="window.open('pu3.htm','','width=300,heigh t=300');return false;">PopUp3</a></td>
<td width="150"><div align="center"></div></td>
</tr>
<td>
</tr>
<tr>
<td><input name="b2" type="submit" value="Enviar formulario"></td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="2"><input name="cat[0]" type="Text" size="20"></td>
<td colspan="2"><input name="cat[1]" type="Text" id="cat[1]" size="20"></td>
</tr>
<tr>
<td colspan="2"><input name="cat[2]" type="Text" id="cat[2]" size="20"></td>
<td colspan="2"><input name="cat[3]" type="Text" id="cat[3]" size="20"></td>
</tr>
<tr>
<td colspan="2"><input name="cat[4]" type="Text" id="cat[4" size="20"></td>
<td colspan="2"><input name="cat[5]" type="Text" id="cat[5]" size="20"></td>
</tr>
</table>
</form>
<div align="center"></div></td>

pu1.htm

<html>
<head>
<title>PU1</title>
<style type="text/css">
<!--
.Estilo1 {font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #009900;
}
.Estilo2 {font-family: Verdana, Arial, Helvetica, sans-serif}
.Estilo5 {font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #990000; }
body {
background-color: #B9E4FF;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body>
<script language="javascript">
contador=0;
function limitarSelección(casilla,form){
if (contador == 6 && casilla.checked){
alert("Solo puedes seleccionar 6 opciones");
return false;
}
pepe=casilla.name;
opener.document.forms[0].elements[pepe].value=(casilla.checked)?casilla.value:"";
contador+=(casilla.checked)?1:-1;
}
</script>
<table width="347" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="416"><table width="342" border="1" align="left" cellpadding="2" cellspacing="0" bordercolor="#0099FF">
<tr>
<td width="20"><input type="checkbox" name="cat[0]" value="CERO" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td width="134" class="Estilo1"><span class="Estilo5"> Opcion 0 </span></td>
<td width="26"><input type="checkbox" name="cat[1]" value="UNO" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td width="136" class="Estilo1"><span class="Estilo5"> Opcion 1 </span></td>
</tr>
<tr>
<td><input type="checkbox" name="cat[2]" value="DOS" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td class="Estilo1"><span class="Estilo5"> Opcion 2 </span></td>
<td><input type="checkbox" name="cat[3]" value="TRES" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td class="Estilo1"><span class="Estilo5"> Opcion 3 </span></td>
</tr>
<tr>
<td><input type="checkbox" name="cat[4]" value="CUATRO" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td class="Estilo1"><span class="Estilo5"> Opcion 4 </span></td>
<td><input type="checkbox" name="cat[5]" value="CINCO" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td class="Estilo1"><span class="Estilo2"><span class="Estilo5"> Opcion 5 </span></span></td>
</tr>
<tr>
<td><input type="checkbox" name="cat[6]" value="SEIS" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td class="Estilo1"><span class="Estilo5"> Opcion 6 </span></td>
<td><input type="checkbox" name="cat[7]" value="SIETE" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td class="Estilo1"><span class="Estilo5"> Opcion 7 </span></td>
</tr>
</table></td>
</tr>
<tr>
<td></td>
</tr>
</table>
</body>
</html>

pu2.htm

<table width="347" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="416"><table width="342" border="1" align="left" cellpadding="2" cellspacing="0" bordercolor="#0099FF">
<tr>
<td width="20"><input type="checkbox" name="cat[8]" value="OCHO" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td width="134" class="Estilo1"><span class="Estilo5"> Opcion 8 </span></td>
<td width="26"><input type="checkbox" name="cat[9]" value="NUEVE" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td width="136" class="Estilo1"><span class="Estilo5"> Opcion 9 </span></td>
</tr>
<tr>
<td><input type="checkbox" name="cat[10]" value="DIEZ" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td class="Estilo1"><span class="Estilo5"> Opcion 10 </span></td>
<td><input type="checkbox" name="cat[11]" value="ONCE" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td class="Estilo1"><span class="Estilo5"> Opcion 11 </span></td>
</tr>
</table>

pu3.htm

<table width="347" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="416"><table width="342" border="1" align="left" cellpadding="2" cellspacing="0" bordercolor="#0099FF">
<tr>
<td width="20"><input type="checkbox" name="cat[12]" value="DOCE" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td width="134" class="Estilo1"><span class="Estilo5"> Opcion 12 </span></td>
<td width="26"><input type="checkbox" name="cat[13]" value="TRECE" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td width="136" class="Estilo1"><span class="Estilo5"> Opcion 13 </span></td>
</tr>
<tr>
<td><input type="checkbox" name="cat[14]" value="CATORCE" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td class="Estilo1"><span class="Estilo5"> Opcion 14 </span></td>
<td><input type="checkbox" name="cat[15]" value="QUINCE" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td class="Estilo1"><span class="Estilo5"> Opcion 15 </span></td>
</tr>
<tr>
<td><input type="checkbox" name="cat[16]" value="DIECISEIS" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td class="Estilo1"><span class="Estilo5"> Opcion 16 </span></td>
<td><input type="checkbox" name="cat[17]" value="DIECISIETE" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td class="Estilo1"><span class="Estilo2"><span class="Estilo5"> Opcion 17 </span></span></td>
</tr>
<tr>
<td><input type="checkbox" name="cat[18]" value="DIECIOCHO" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td class="Estilo1"><span class="Estilo5"> Opcion 18 </span></td>
<td><input type="checkbox" name="cat[19]" value="DIECINUEVE" onClick="limitarSelecci&oacute;n(this,this.form)"> </td>
<td class="Estilo1"><span class="Estilo5"> Opcion 19 </span></td>
</tr>
</table>
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 11:52.