I have two popups, one opens when i do a click in the button of the first one. My problem is that the first popupdoesn´t send the data i want to the second popup.
Here is the code:
First popup:
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!-- Idea by: Nic Wolfe (Nic@TimelapseProductions.com) -->
<!-- Web URL: http://fineline.xs.mw -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function openpopup2(c){
winpops=window.open("/nuevoCom.php?c="+c,"","width=640,height=370,scrollbars,resizable");
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 3</title>
</head>
</html>
<?php
echo "<html>";
echo "<head>";
echo "<meta http-equiv='Content-Language' content='es-pe'>";
echo "<meta name='GENERATOR' content='Microsoft FrontPage 5.0'>";
echo "<meta name='ProgId' content='FrontPage.Editor.Document'>";
echo "<meta http-equiv='Content-Type' content='text/html; charset=windows-1252'>";
echo "<title>CASOS</title>";
echo "</head>";
echo "<body background='/imagenes/fondoN.bmp' bgproperties='fixed'>";
echo "<p><b><font size='6'><img border='0' src='/imagenes/caso.gif' width='108' height='63'> ";
echo "<font color='#00FF00'> </font></font></b><font color='#99CCFF'><b><font size='7'> Comentarios ";
echo "<p> ";
echo" <FORM METHOD='POST' ACTION='javascript:openpopup2($num)'>";
$connectlog = mysql_connect(localhost,root,mysql) or die("No se puede conectar!");
$query="select comentario,fecha,hora,rma from comentarios where rma='$b' order by fecha asc";
mysql_select_db(logistica);
$result = mysql_query($query) or die ("Error en el query: $query. " . mysql_error());
if (mysql_num_rows($result)>=1)
{
echo" <p align='center'><table border='1' cellsapcing='1' width=450' height='50'>";
echo"<tr>";
echo"<td width='150' height='1' nowrap align='center' bgcolor='#99CCFF'><font color='#800080'>FECHA</font></b></td>";
echo"<td width='150' height='1' nowrap align='center' bgcolor='#99CCFF'><font color='#800080'>COMENTARIO</font></b></td>";
echo"</tr></p>";
while($row=mysql_fetch_row($result)){
echo" <table border='1' cellspacing='1' width='450' height='45'>";
echo" <tr>";
echo"<td width='150' height='1' nowrap align='center'><font color='#CCFFFF' size='4'>$row[1]</font<</td>";
echo"<td width='150' height='1' nowrap align='center'><font color='#CCFFFF' size='4'>$row[2]</font<</td>";
echo"<td width='150' height='1' nowrap align='center'><font color='#CCFFFF' size='4'><a href='javascript:openpopup(\"$row[0]\")'>LEER</a></font></td>";
echo" </tr>";
echo"</table>";
$num=$row[3];
}
mysql_free_result($result);
echo " <p align=center><INPUT TYPE='SUBMIT' NAME='scomen'><br>";
echo " </FORM> ";
echo "</body>";
echo "</html>";
}
else{
echo" <p align='center'>";
echo" BASE DE DATOS VACÍA";
}
?>
Second popup:
<?php
echo "<html>";
echo "<head>";
echo "<meta http-equiv='Content-Language' content='es-pe'>";
echo "<meta name='GENERATOR' content='Microsoft FrontPage 5.0'>";
echo "<meta name='ProgId' content='FrontPage.Editor.Document'>";
echo "<meta http-equiv='Content-Type' content='text/html; charset=windows-1252'>";
echo "<title>CASOS</title>";
echo "</head>";
echo "<body background='/imagenes/fondoN.bmp' bgproperties='fixed'>";
echo "<p><b><font size='6'><img border='0' src='/imagenes/caso.gif' width='108' height='63'> ";
echo "<font color='#00FF00'> </font></font></b><font color='#99CCFF'><b><font size='7'> Nuevo Comentario ";
echo "<p> ";
echo " <FORM METHOD='POST' ACTION='cambiarCom.php?var=1&tipo=$tipo&c=$c'>";
echo $c;
echo" <p align='center'><textarea rows='12' name='txtcom' cols='70'>$a</textarea></p>";
echo" <p align='center'><input type='submit' name='bcom'></p>";
echo " </FORM> ";
echo "</body>";
echo "</html>";
?>
Thanks for the help.