RE: [PHP-WIN] Strange problem 'window.open'

From: Date: Wed, 17 Apr 2002 16:02:10 +0000
Subject: RE: [PHP-WIN] Strange problem 'window.open'
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-13142@lists.php.net to get a copy of this message
Okay: I mistaken to do a copy/paste, sorry. The javascript in my original page is okay. Tha main problem is that the window.open is well executed sometimes and some other times I get the *CGI Error* Thanx, Fabio > -----Original Message----- > From: Sichta Daniel [mailto:Daniel.Sichta@swh.sk] > Sent: Wednesday, April 17, 2002 4:19 PM > To: Fabio > Subject: RE: [PHP-WIN] Strange problem 'window.open' > > > Hi Try this: > > <script> > window.open('totale.php?IDT='+<?=$IDT;?>'+,'leftframe');"; > // <--- !!! here is > the problem !!! > </script> > > -----Original Message----- > From: Fabio [mailto:mind@zolnetwork.com] > Sent: Wednesday, April 17, 2002 4:17 PM > To: php-windows@lists.php.net > Subject: [PHP-WIN] Strange problem 'window.open' > > > 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 > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.windows (#13142) next »