Strange problem 'window.open'

From: Date: Wed, 17 Apr 2002 14:16:56 +0000
Subject: Strange problem 'window.open'
Groups: php.windows 
Request: Send a blank email to php-windows+get-13137@lists.php.net to get a copy of this message
This is my page: ---------------------- <html> <head> <script language = "Javascript" src="general.js"></script> </head> <body> <? include "general.php"; include "param.php"; if (!($conn=mssql_connect($DBserver, $DBusername, $DBpassword))) { die("Errore di connessione al server"); } if (!(mssql_select_db($DBdatabase, $conn))) { die("Errore di connessione al database"); } $sql="SELECT * FROM TEMPORANEA WHERE IDT=".$IDT; if (!($result=mssql_query($sql, $conn))) { die("Errore nella query ".$sql); } $datarecord=mssql_fetch_array($result); ?> <form name="theform" method="POST" action="input.php"> <table width=100% border=0 cellspacing=0 cellpadding=0> <tr> <td> <? here some php code to display $datarecord[...] ?> </td> </tr> </table> </form> <? $sql="UPDATE mytable SET myfield1=1,myfield2=2"; if (!($result=mssql_query($sql, $conn))) { die("Errore nella query ".$sql); } mssql_close($conn); ?> <script> window.open('totale.php?IDT=".$IDT."','leftframe');"; // <--- !!! here is the problem !!! </script> </body> </html> ---------------------- The marked line should open the php page in 'leftframe' frame: some time this is not done and I get the error: ---------------- CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: ---------------- I try to reload the main page and 'totale.php' is opened in the right way. The problem seems to be is in the window.open that sometimes loads the wrong page or none. If I put an alert('test'); befone the window.open, that window is opened *always*. Is there some setting to look for in php.ini or this method to open windows is not correct? Thanx, Fabio

« previous php.windows (#13137) next »