Este es el código del php:
Código :
<html>
<head>
<title>Envío de mails con PHP</title>
</head>
<?
$sendTo = "[email protected]";
$subject = $HTTP_GET_VARS["asunto"];
$headers = "From: " . "Prueba Domenet";
$headers .= "<" . $HTTP_GET_VARS["email"] . ">\r\n";
$headers .= "Reply-To: " . $HTTP_GET_VARS["email"];
$message = $HTTP_GET_VARS["cuerpo"];
mail($sendTo, $subject, $message, $headers);
echo "&respuesta=Enviando mensaje...";
?>
<body>
<script language=javascript>
var enlace="enviando_mail.php?asunto=Mensaje de prueba&[email protected]&cuerpo=A ver si de una vez...";
var idVentana;
function ventanaSecundaria (URL){
var ancho=150;
var alto=150;
var cTop=(screen.height/2)-(alto/2);
var cLeft=(screen.width/2)-(ancho/2);
idVentana=window.open(URL,"ventana1","width="+ancho+", height="+alto+", status=NO, scrollbars=NO, toolbar=NO, top="+cTop+", left="+cLeft)
}
function CierraVentana(){
idVentana.close();
}
setTimeout("ventanaSecundaria(enlace)",5);
setTimeout("CierraVentana()",10000);
</script>
</body>
</html>
Entonces, el tema es que la parte en PHP si funciona bien, pero sin embargo la parte de javascript no funciona, esto es, no se abre ningún pop-up.
A ver si con esto queda mas claro.