Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/02/2004, 04:18
rsalvadores
 
Fecha de Ingreso: octubre-2003
Mensajes: 40
Antigüedad: 20 años, 6 meses
Puntos: 0
Prueba con esto.

<html>
<head>
<script language="JavaScript">

function nueva_ventana(){
if (document.centro.id.value != "null"){
ancho = screen.width - 13;
if (ancho > 1280)
ancho = 1270;
alto = screen.height - 50;
window.open("alta.php","sobreventana"," toolbar=no,location=no,directories=no,status=yes,m embar=no,scrollbars=yes,resizable=yes,width="+anch o+",height="+alto+",left=0,top=0");
}
else alert("Debe seleccionar dato")
}

/*function comprueba_select()
{
if (document.centro.id.value!=null) nueva_ventana();
else alert("Debe seleccionar dato")
}*/

</script>
</head>
<body bgcolor="#8CB7CA">
<hr>
<table valign="top" width="991">
<td class="menu" width="132">[<a href="Javascript:nueva_ventana()" title="Agregar Usuario">Agregar Usuario</a>]</td>
<td class="menu" width="84">[<a href="Salir" onClick="javascript:window.close();">Salir</a>]</td>
</table>
<tr width="100%" height="88%" valign="top">
<td valign="top" align="center" colspan="2">
<hr>
<p align="center"><font color="#285F78" size="5"><b><u>Selección del Centro</u></b></font></p>
<table width="35%" cellspacing="0" cellpadding="0" align="center">
<form name="centro" method="post" action="Javascript:alert (document.centro.id.value)">
<tr>
<td class="drkblbld">Centro:</td>
<td>
<select name="id" onChange="javascript:if (this.options[this.selectedIndex].value!='null'){this.form.submit();}">
<option value="null">Seleccione dato </option>
<option value="1">Seleccione 1 </option>
<option value="2">Seleccione 2 </option>
<option value="3">Seleccione 3 </option>
<option value="4">Seleccione 4 </option>
</form>
</table>

</body>
</html>

Saludos

rsalvadores