Sapevo che era possibile !!!!
Nel mio esempio, ci sono 4 form di un campo test ciascuna. Il click sul pulsante invia un richiamo al file test183b.php che crea un file "provaX.txt" 1<=X<=4. Tra ogni submit c'è un richiamo ad una pagina che si chiude automaticamente (altrimenti solo la quarta form veniva trattata
)
file :test183.php
codice:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script language="JavaScript" type="text/javascript">
<!--
function send() {
document.getElementById('f1').submit();
window.open("test183c.html","","top=300,left=300,width=300,height=250,status=yes");
document.getElementById('f2').submit();
window.open("test183c.html","","top=300,left=300,width=300,height=250,status=yes");
document.getElementById('f3').submit();
window.open("test183c.html","","top=300,left=300,width=300,height=250,status=yes");
document.getElementById('f4').submit();
}
//-->
</script>
</head>
<body>
<form id="f1" action="test183b.php" method="post">
<input type="text" name="pippo" value="">
<input type="hidden" name="h" value="1">
</form>
<form id="f2" action="test183b.php" method="post">
<input type="text" name="pippo" value="">
<input type="hidden" name="h" value="2">
</form>
<form id="f3" action="test183b.php" method="post">
<input type="text" name="pippo" value="">
<input type="hidden" name="h" value="3">
</form>
<form id="f4" action="test183b.php" method="post">
<input type="text" name="pippo" value="">
<input type="hidden" name="h" value="4">
</form>
<input type="button" value="Send" onclick="send();">
</body>
</html>
file : test183b.php
codice:
<?
$fp = fopen("prova$h.txt", "w");
fwrite ($fp, $pippo);
fclose($fp);
header("Location: ".$HTTP_SERVER_VARS['HTTP_REFERER']);
exit;
?>
file : test183c.html
codice:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
Registrando la form
<script language="JavaScript" type="text/javascript">
<!--
window.close();
//-->
</script>
</body>
</html>