홈페이지를 관리하면서 기술적으로 필요한 글들을 메모 형식으로 정리하였습니다.
현재까지는 교회 홈피 관리자에게 도움이 되는 다소 전문적인 내용이 많습니다.
이제는 인터넷에 글을 쓸 때 이쁘게 디자인 할 수 있도록 돕는 내용을 더 많이 올릴 계획입니다.
제로보드 XE의 경우 index 팝업의 설정이 일반 홈피의 것보다 조금 다르게 적용되어야 합니다.
index를 적용한 레이아웃의 헤드 스크립트에 아래 소스를 추가하여
팝업을 레이어로 적용할 수 있습니다.
활용은 하나의 통이미지로 만들어 사용하는 게 편리합니다
좋은 소스여서 참고하였습니다.
<!-- 레이어팝업 시작 -->
<script language="JavaScript">
<!-- JavaScript
function pop_win(){
if(document.all["popWindow"].style.display==""){
document.all["popWindow"].style.display="none"
}
}
// SET
function notice_setcookie( name, value , expiredays )
{
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
// GET
function notice_getcookie( name )
{
var nameOfcookie = name + "=";
var x = 0;
while ( x <= document.cookie.length )
{
var y = (x+nameOfcookie.length);
if ( document.cookie.substring( x, y ) == nameOfcookie ) {
if ( (endOfcookie=document.cookie.indexOf( ";", y )) == -1 )
endOfcookie = document.cookie.length;
return unescape( document.cookie.substring( y, endOfcookie ) );
}
x = document.cookie.indexOf( " ", x ) + 1;
if ( x == 0 )
break;
}
return "";
}
function notice_closeWin()
{
if ( document.form1.Notice.value=="checked" )
notice_setcookie( "Notice_main0324", "done" , 1); // 1=하룻동안 공지창 열지 않음
pop_win();
}
// - JavaScript --->
</script>
<script language="JavaScript1.2">
<!-- JavaScript
// =======================================
// do not edit anything below this line
// =======================================
isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;
function ddInit(e){
topDog=isIE ? "BODY" : "HTML";
whichDog=isIE ? document.all.popWindow : document.getElementById("popWindow");
hotDog=isIE ? event.srcElement : e.target;
while (hotDog.id!="popWindow"&&hotDog.tagName!=topDog){
hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
}
if (hotDog.id=="popWindow"){
offsetx=isIE ? event.clientX : e.clientX;
offsety=isIE ? event.clientY : e.clientY;
nowX=parseInt(whichDog.style.left);
nowY=parseInt(whichDog.style.top);
ddEnabled=true;
document.onmousemove=dd;
}
}
function dd(e){
if (!ddEnabled) return;
whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx;
whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
return false;
}
document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");
// - JavaScript --->
</script>
<!--팝업내용_통이미지-->
<div id="popWindow" style="position:absolute;z-index:1000;top:160px;left:345px;visibility;" onSelectStart="return false">
<form name="form1">
<input type="hidden" name="Notice" value="nochecked">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><a href="#" ><img src="http://사진주소amen.net/bbs/data/03/1309008356/page.jpg" alt="홀리나라" border="0"></a></td>
</tr>
<tr>
<td background="" height="38" align="right" style="padding:0 30 0 0;"><a href="javascript:isCheck('service_stop');" onFocus="blur();"><img src="http://qholyqt.com/xeqtlink/arrow/pop1.jpg" name="service_stop" border="0"></a>
<a href="javascript:notice_closeWin();"><img src="http://qholyqt.com/xeqtlink/arrow/close.jpg" alt="close" border="0"></a></td>
</tr>
</table>
</form>
</div>
<!--//팝업내용_통이미지-->
<script language="JavaScript">
<!-- JavaScript
if ( notice_getcookie( "Notice_main0324" ) == "done" ){ pop_win();}
service_stop_check = new Image;
service_stop_no_check = new Image;
service_stop_check.src="http://qholyqt.com/xeqtlink/arrow/pop2.jpg";
service_stop_no_check.src=" {
document.form1[name].value='nochecked';
imgName=eval(name+"_no_check.src");
document[name].src="imgName;
document.form1.Notice.value = "nochecked";
}
else
{
document.form1[name].value='checked';
imgName=eval(name+"_check.src");
document[name].src="imgName;
document.form1.Notice.value = "checked";
}
}
// - JavaScript --->
</script>
<!-- 레이어팝업 끝 -->


