[SOLVED ] open new window
Posted: Fri Apr 16, 2004 2:45 pm
The following code does open up a new window however with the following error
The requested URL /user/undefined was not found on this server.
Code: Select all
<script language="JavaScript">
<!--
function abrirVentana(theURL)
{
var cadena;
var ancho, alto;
ancho = screen.availWidth - 10;
alto = screen.availHeight - 50;
cadena = 'left=0,top=0,border=0,status=yes,scrollbars=no,toolbar=no,menubar=no,location=no,resizable=yes,' + 'width=' + ancho + ',height=' + alto;
window.open(theURL, "indexsecure.php", cadena);
}
function CargaString()
{
window.status = "Welcome to ..........;
var yourname = getCookie("USERNAME");
if (yourname != null)
{
//Ha cargado el sitio previamente
Tiempo = setTimeout("abrirVentana('indexsecure.php')", 500);
}
else
{
//No ha cargado el sitio previamente
register("USERNAME");
Tiempo = setTimeout("abrirVentana('indexsecure.php')", 500);
}
}
abrirVentana();
CargaString();
//-->