Tema: Body onload
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/11/2007, 10:23
Avatar de DIRAB51
DIRAB51
 
Fecha de Ingreso: diciembre-2002
Mensajes: 106
Antigüedad: 21 años, 4 meses
Puntos: 0
Busqueda Body onload

¿como hago para que se abra la ventana sin apretar en (open window)?
Gracias anticipadas.

Este es el codigo:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<script>
<!--


var winheight=100
var winsize=100
var x=5




function openwindow(thelocation){
temploc=thelocation
if (!(window.resizeTo&&document.all)&&!(window.resize To&&document.getElementById)){
window.open(thelocation)
return
}
win2=window.open("","","scrollbars")
win2.moveTo(0,0)
win2.resizeTo(100,100)
go2()
}
function go2(){
if (winheight>=screen.availHeight-3)
x=0
win2.resizeBy(5,x)
winheight+=5
winsize+=5
if (winsize>=screen.width-5){
win2.location=temploc
winheight=100
winsize=100
x=5
return
}
setTimeout("go2()",50)
}
//-->
</script>

<p><a href="javascript:openwindow('http://wsabstract.com')">Open window</a>

<p>

</body>
</html>