이 소스에서 자동으로 창이 닫히게 하고 싶어요 ㅜ.ㅜ

<html>
<head>

<script>
var redirecturl="./board.php?bo_table=<?=$bo_table?>"
var pausefor=2  //초

function postaction(){
    if (window.timer){
        clearInterval(timer)
        clearInterval(timer_2)
    }
    window.location=redirecturl
}
setTimeout("postaction()",pausefor*1000)
</script>

<script language="JavaScript1.2">
<!--
var switchm=new Array
    switchm[0]="ffaa00";
    switchm[1]="ffff00";
    switchm[2]="00ff00";
    switchm[3]="0099ff";
    switchm[4]="ff0000";
    switchm[5]="ff00ff";
i=0
j=0
function STROBE() {
if (j>increment.length-1)
    {
    j=0
    i++
        if (i>switchm.length-1)
        {
        i=0
        }
    }
    document.all.increment[j].filters.blendTrans.apply()
    document.all.increment[j].bgColor=switchm[i]
    document.all.increment[j].filters.blendTrans.play()
    j++
}
    timer=setInterval("STROBE()",20) // change the number to effect the speed of the loadbar.
    timer_2=setInterval("REVEAL()",20)
   
function REVEAL() {
    if (document.images[0].complete)
        {
        clearInterval(timer)
        clearInterval(timer_2)
        document.all.loadbar.style.visibility="hidden";
        document.all.content.style.visibility="visible";
        }
    }
//-->
</script>
<style>
<!--
#increment    {    filter:blendTrans(duration=1)    }
-->
</style>

<div id=loadbar style=position:relative;top:expression(document.body.clientHeight/2-100);left:expression(document.body.clientWidth/2-50)>
<table cellspacing=0 cellpadding=0 width=800> 
<tr>
 
  <td colspan=2><b>Loading..중 완료되면 자동으로 닫힙니다</b></td></tr>
<tr>
    <script language="JavaScript">
    <!--
        for (k=0;k<10;k++) {
            document.write("<td id=increment width=10 height=20></td>") // 로딩바 크기조절
        }
    //-->
    </script>
</tr>
</table>
</div>
 
<div id=content style="position:absolute;top:expression((document.body.clientHeight-document.images[0].height)/2);left:expression((document.body.clientWidth-document.images[0].width)/2);visibility:hidden;">
<img src=placeholder.gif width=1 height=1>
</div>

</body>
</html>
 
 
 
지금은 시간이 되면 다른페이지로 옮겨가는걸로 되어있습니다만..
 
이걸 팝업창으로 열게 해서... 자동으로 닫히게 하고 싶습니다 ㅜ.ㅜ
 
도와주세요...
|

댓글 2개

위기의남자// 또 답변을 달아주러 오셨군요 ^^ 반갑습니다~ 그런데 닫히질 않네요.. 몇초후에 닫히는게 아닌거 같은데..
해결되었습니다.

clearInterval(timer_2)
}
window.location=redirecturl
}
setTimeout("postaction()",pausefor*1000)
</script>

여기서

clearInterval(timer_2)
}
window.location=redirecturl
self.close(); <- 이거 한줄만 추가하면 되는군요 ^^

}
setTimeout("postaction()",pausefor*1000)
</script>
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
18년 전 조회 1,504
18년 전 조회 1,506
18년 전 조회 1,519
18년 전 조회 1,661
18년 전 조회 1,535
18년 전 조회 2,043
18년 전 조회 1,522
18년 전 조회 1,684
18년 전 조회 2,305
18년 전 조회 1,555
18년 전 조회 3,041
18년 전 조회 1,510
18년 전 조회 1,657
18년 전 조회 1,547
18년 전 조회 1,520
18년 전 조회 1,646
18년 전 조회 1,608
18년 전 조회 1,676
18년 전 조회 1,745
18년 전 조회 1,270
🐛 버그신고