Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/10/2005, 16:50
denova
 
Fecha de Ingreso: octubre-2005
Mensajes: 2
Antigüedad: 18 años, 6 meses
Puntos: 0
php con javascript

ALBERTO

que tal, sabes estoy en un serio problema; quiero saber si me pueden ayudar. Lo que quiero hacer, es agregar una tabla con datos a un popup ý que se puedan corregir y borrar desde el popup, me gustara saber si eso es posible, ya lo he intentado de varias formas, pero ya me confunfi

Este es mi codigo: (visa1.php) en el cual al ejecutarse me abre una tabla de insercion de datos, los datos que se insertan me los muestra en una tabla, pero quiero que esos datos que inserte los muestre en un popup.

ME PODRIAN AYUDAR POR FAVOR....

<SCRIPT LANGUAGE="JavaScript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=1,width=600,height=300,left = 212,top = 234');");
}
</script>

<?php

echo "<html>";
echo "<title></title>";
echo "<head>";




echo'<div id="Layer1" style="position:absolute; width:893px; height:31px; z-index:21; background-image: url(barrasuperior.jpg); layer-background-image: url(barrasuperior.jpg); border: 1px none #000000; left: 43px; top: 16px;"></div>';
echo'<div id="Layer2" style="position:absolute; width:300px; height:28px; z-index:22; left: 363px; top: 67px;">';
echo' <div align="center"><strong><font color="#0000CC" size"18">C O N S T A N C I A S</font></strong></div>';
echo'</div>';
echo'<div id="Layer3" style="position:absolute; width:894px; height:31px; z-index:23; left: 50px; top: 852px; background-image: url(barrasuperior.jpg); layer-background-image: url(barrasuperior.jpg); border: 1px none #000000;"></div>';

echo'<div id=contenido style="position: absolute; left:32px; top: 119px; width:936px; height: 715px; z-index:20; background-image: url(cajavisa.jpg); layer-background-image: url(cajavisa.jpg); border: 1px none #000000;"; border:5px"> ';
echo' <p>&nbsp;</p>';
echo' <p align="center" class="Estilo2">&nbsp;</p>';


echo'<p align="center" class="Estilo2">&nbsp;</p>';


echo "</head>";

echo "<body>";
echo "<center>";
echo '<form name="form" action="visa1.php" method="post" >';
echo '<select name="select">';
echo ' <option>CONSTANCIAS</option>';
echo "<option>Visa</option>";
echo " <option>Escalafon</option>";
echo "</select>";
echo " <br><br><br>";
echo 'RFC:<input name="rfcc" type="text" size="13">';
echo "<br><br><br>";
echo ' <table width="555" border="1">';
echo " <tr>";
echo '<td><div align="center">unidad</div></td>';
echo '<td><div align="center">subunidad</div></td>';
echo '<td><div align="center">plaza</div></td>';
echo '<td><div align="center">categoria</div></td>';
echo '<td><div align="center">hrs</div></td>';
echo '<td><div align="center">percepciones</div></td>';
echo '<td><div align="center">07</div></td>';
echo '<td><div align="center">04</div></td>';
echo '<td><div align="center">A1</div></td>';
echo '<td><div align="center">ctro</div></td>';
echo "</tr>";
echo "<tr>";
echo '<td><div align="center">';
echo '<input name="unidad" type="text" size="2" maxlength="2">';
echo " </div></td>";
echo '<td><div align="center">';
echo '<input name="subunidad" type="text" size="2" maxlength="2">';
echo "</div></td>";
echo '<td><div align="center">';
echo '<input name="plaza" type="text" size="6" maxlength="6">';
echo "</div></td>";
echo '<td><div align="center">';
echo '<input name="categ" type="text" size="6" maxlength="6">';
echo "</div></td>";
echo '<td><div align="center">';
echo '<input name="hrs" type="text" size="2" maxlength="2">';
echo "</div></td>";
echo '<td><div align="center">';
echo '<input name="percepciones" type="text" size="10" maxlength="10">';
echo "</div></td>";
echo '<td><div align="center">';
echo '<input name="cerosiete" type="text" size="10" maxlength="10">';
echo "</div></td>";
echo '<td><div align="center">';
echo '<input name="cerocuatro" type="text" size="7" maxlength="7">';
echo " </div></td>";
echo '<td><div align="center">';
echo '<input name="auno" type="text" size="7" maxlength="7">';
echo "</div></td>";
echo '<td><input name="ctro" type="text" size="10" maxlength="15"></td>';
echo "</tr>";
echo "</table>";
echo "<br><br><br>";
echo '<input type="submit" name="Submit" value="Insertar">';
echo '</form>';

include("conexion.php");
$link=Conectarse();

$sql="select rfc from usuarios where rfc='$rfcc' ";
$query= mysql_query($sql,$link);

if ( mysql_num_rows($query) >0 )
{
mysql_query("insert into constanciass(rfccons,unidad,subunidad,plaza,categ, hrs,percepciones,cerosiete,cerocuatro,auno,ctro) values ('$rfcc','$unidad','$subunidad','$plaza','$categ', '$hrs','$percepciones',$cerosiete,$cerocuatro,$aun o,'$ctro')",$link);

}

$result=mysql_query("select * from constanciass where rfccons='$rfcc' ",$link);


echo '<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=1> ';
echo '<TR> <TD>&nbsp;<B>RFC</B></TD> <TD>&nbsp;<B>Unidad</B></TD> <TD>&nbsp;<B>Subunidad</B></TD> <TD>&nbsp;<B>Plaza</B></TD> <TD>&nbsp;<B>Categoria</B></TD> <TD>&nbsp;<B>Horas</B></TD> <TD>&nbsp;<B>Percepciones</B></TD> <TD>&nbsp;<B>0 7</B></TD> <TD>&nbsp;<B>0 4</B>&nbsp;</TD> <TD>&nbsp;<B>A 1</B></TD> <TD>&nbsp;<B>Centro de trabajo</B></TD> <TD>&nbsp;<B>Eliminar</B></TD> <TD>&nbsp;<B>Modificar</B></TD> </TR>';


//ESTA PARTE ES LA TABLA QUE QUIERO QUE ME APARESCA EN EL POPUP

while($row = mysql_fetch_array($result))
{
printf("<tr> <td>&nbsp;%s</td> <td>&nbsp;%s</td> <td>&nbsp;%s&nbsp;</td> <td>&nbsp;%s</td> <td>&nbsp;%s</td> <td>&nbsp;%s</td> <td>&nbsp;%s</td> <td>&nbsp;%s</td> <td>&nbsp;%s</td> <td>&nbsp;%s</td> <td>&nbsp;%s</td> <td><a href=\"borrar.php?id=%d\">Borrar</a></td> <td><a href=\"editar.php?id=%d\">Editar</a></td> </tr>", $row["rfccons"], $row["unidad"], $row["subunidad"], $row["plaza"], $row["categ"], $row["hrs"], $row["percepciones"], $row["cerosiete"], $row["cerocuatro"], $row["auno"], $row["ctro"], $row["id_cons"], $row["id_cons"]);
}

mysql_free_result($result);
mysql_close($link);

echo '</table>';
echo "</center>";
echo '</body>';
echo '</html>';
?>
<html>
<body>
<center><br><br><br>
<A HREF="javascript:popUp('')">Ver Lista de Claves</A>
</center>
</body>
</html>