이 소스에서 자동으로 창이 닫히게 하고 싶어요 ㅜ.ㅜ > 그누4 질문답변

그누4 질문답변

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

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

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

본문

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

댓글 전체

해결되었습니다.

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

여기서

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

}
setTimeout("postaction()",pausefor*1000)
</script>
© SIRSOFT
현재 페이지 제일 처음으로