JAVASCRIPT 커지면서 열리는 윈도우-아래로 커진후 옆으로 커짐

-------- 파일 : test.html ----------------
<html>
<head>
<title>커지면서 열리는 윈도우-이번것은 아래로 커진후 옆으로 커집니다.</title>

<SCRIPT language=JavaScript>
<!-- Begin
function expandingWindow(website) {
var windowprops='width=100,height=100,scrollbars=yes,status=yes,resizable=yes'
var heightspeed = 2; // 스크롤 속도-높이
var widthspeed = 7;  // 스크롤속도-넓이 (higher = slower)
var leftdist = 10;    // 처음 열리는 위치 왼쪽에서
var topdist = 10;     // 위쪽에서 처음 열리는 위치

if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1) {
var winwidth = window.screen.availWidth - leftdist;
var winheight = window.screen.availHeight - topdist;
var sizer = window.open("","","left=" + leftdist + ",top=" + topdist +","+ windowprops);
for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed)
sizer.resizeTo("1", sizeheight);
for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed)
sizer.resizeTo(sizewidth, sizeheight);
sizer.location = website;
}
else
window.open(website,'mywindow');
}
//  End -->
</SCRIPT>

</head>


<body bgcolor="#207400" text="#ffffff" link="#ffffff">

<form>
<input type="button" value="클릭하세요!" onClick="expandingWindow('./test_pop.html')">
</form>

</body>
</html>



-------- 파일 : test_pop.html ---------

<html>
<head></head>
<body onresize="parent.resizeTo(800,600)" onload="parent.resizeTo(800,600)">
</body>
</html>

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다