codigo
pop up
Código PHP:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="wood.css" rel="stylesheet" type="text/css">
<script>
//Desabilita la Caja de Texto
var indice=1;
vec_criterio= new Array();
function Criterio(nombre)
{
this.nombre=nombre;
}
function desabilitar()
{
//if(document.form1.criterio.value=="")
document.form1.criterio.disabled=true;
}
//Almacena las datos en un Vector
function almacenar()
{
var criterio=document.form1.criterio.value;
if(document.form1.criterio.value !="")
{
//opener.document.vec_criterio[indice]= new Criterio();
vec_criterio[indice]= new Criterio(criterio);
document.form1.criterio.value="";
indice++;
}
else
{
if(document.form1.criterio.disabled==true)
document.form1.criterio.disabled=false;
else
alert("Digite la norma");
}
}
function Salir()
{
if (document.form1.criterio.value!="")
alert("La Norma no ha sido Guardada");
else
{
for(var i=1; i<indice; i++){
opener.vec_criterio[i]=new criterio (vec_criterio[i]->nombre);
}
window.close();
}
}
</script>
</head>
<body bgcolor="#336666">
<form name="form1" method="post" action="">
<table width="42%" border="1" class="Border" align="center">
<tr>
<td colspan="2" class="Tablerow">INGRESE NUEVO CRITERIO DE DESEMPEÑO</td>
</tr>
<tr>
<td width="35%" class="TableRow">Nombre Criterio</td>
<td width="65%" class="TableRowContents"><input type="text" name="criterio" id ="criterio" class="BoxNameAncha"></td>
</tr>
<tr>
<td class="TableRow"><input name="bot_nva_cri" type="button" id="bot_nva_cri" value="Adicionar" class="Buttons" onClick="almacenar()"></td>
<td class="TableRow">
<input name="bot_can_cri" type="button" id="bot_can_cri" value="Salir" class="Buttons" onClick="Salir()">
</td>
</tr>
</table>
</form>
<iframe name="calculoFrame" src="" height="0" width="0"></iframe>
<script>desabilitar();</script>
</body>
</html>
y el da la opener
es
Código PHP:
<SCRIPT LANGUAGE='JavaScript'>
vec_criterio= new Array();
function ventana(nombre, ancho, alto)
{
var dat = 'width=' + ancho + ',height=' + alto+ ',left=0,top=0,scrollbars=no,resize=no,menubar=yes,toolbar=no,status=no';
window.open(nombre,'',dat);
}
</SCRIPT>
<body bgcolor="#336666">
<form action="" method="post" name="forma1" id="forma1">
<input name="bot_nva_crit" type="button" class="Buttons" id="bot_nva_crit" value="Nuevo Criterio" onClick="ventana('nvocriterio.php',300,300)">
</form>
</body>
chao