이 소스에서 자동으로 창이 닫히게 하고 싶어요 ㅜ.ㅜ 정보
이 소스에서 자동으로 창이 닫히게 하고 싶어요 ㅜ.ㅜ본문
<html>
<head>
<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";
switchm[0]="ffaa00";
switchm[1]="ffff00";
switchm[2]="00ff00";
switchm[3]="0099ff";
switchm[4]="ff0000";
switchm[5]="ff00ff";
i=0
j=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>
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>
<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>
<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>
clearInterval(timer_2)
}
window.location=redirecturl
}
setTimeout("postaction()",pausefor*1000)
</script>
여기서
clearInterval(timer_2)
}
window.location=redirecturl
self.close(); <- 이거 한줄만 추가하면 되는군요 ^^
}
setTimeout("postaction()",pausefor*1000)
</script>