묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
상당히좋은 자바소스입니다.. 강좌 요청합니다
2003.10.11 10:31
미리보기: http://luxaeterna.javasarang.net/Untitled-3.php
어렵사리 소스를 알아냈는데..
이걸 어떻게 응용해야할지 모르겠어요
이래저래 생각많이해보면서 적용을 해봤는데.. 뭐가 잘못된건지 몰라도
안되네요 경험 많으신분이나 흥미 있으신분 한번 써보시고 어떻게 하면될지
팁좀 부탁드려요
==========================================
==========================================
헤더 부분에 삽입해야하는내용입니다
<script language="javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}
</script>
==========================================
==========================================
본문에 삽입되는, 겸치는 레이어 두개 입니다 최근게시물 로그인 등등 많은부분에 응용가능해보이네요..
<div id="me1" style="position:absolute; left:198px; top:282px; width:580; z-index:1">
<table width="381" border="0" cellspacing="0" cellpadding="0" height="95">
<tr>
<td colspan="3" height="26" background="img/bac_0001.gif">
<a href="help/news/"> <img src="http://www.estudy.or.kr/usr/gene/img/notice-on.gif" border="0" alt="알려 드립니다." usemap="#Map" align="absmiddle"> </a>
</td>
</tr>
<tr height="95">
<td width="1" bgcolor="#E8E8E8"></td>
<td width="379" align="center" valign="top" height="80">
<table width="360" border="0" cellspacing="0" cellpadding="0">
<tr><td colspan="2" height="8"></td></tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="275"><a href="JavaScript:goView('help/news/','vi','204','','','','')"><b><font color="#339966">[축하] 정기이벤트 (7월~9월) 대상 발표</a></td>
<td width="70">2003-10-09</td>
</tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="275"><a href="JavaScript:goView('help/news/','vi','203','','','','')"><font color="#CC6699"><b>[안내] 패밀리21, 인터넷쇼핑몰 창업교육 </a></td>
<td width="70">2003-10-06</td>
</tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="275"><a href="JavaScript:goView('help/news/','vi','202','','','','')"><font color=blue><b>[알림]정보화상담 일반상담가 모집 결과발표</a></td>
<td width="70">2003-10-04</td>
</tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="275"><a href="JavaScript:goView('+ '+ 'help/news/','vi','199','','','','')"><FONT color=#6666fd><B>[공지] 10월 무료 온라인교육 수강신청 안내 </a></td>
<td width="70">2003-09-29</td>
</tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="275"><a href="JavaScript:goView('help/news/','vi','198','','','','')"><B><font color="#9900CC">[깜짝이벤트] 배움가족 10만명 돌파 기념!!!</a></td>
<td width="70">2003-09-26</td>
</tr>
<tr><td colspan="2" height="8"></td></tr>
</table>
</td>
<td width="1" bgcolor="#E8E8E8"></td>
</tr>
<tr><td colspan="3" height="1" bgcolor="E8E8E8"></td></tr>
</table>
</div>
<div id="me2" style="position:absolute; left:198px; top:282px; width:580; z-index:1;visibility:hidden;">
<table width="381" border="0" cellspacing="0" cellpadding="0" height="95">
<tr>
<td colspan="3" height="26" background="img/bac_0001.gif">
<img src="http://www.estudy.or.kr/usr/gene/img/notice-on.gif" border="0" alt="알려 드립니다." usemap="#Map" align="absmiddle">
</td>
</tr>
<tr height="95">
<td width="1" bgcolor="#E8E8E8"></td>
<td width="379" align="center" valign="top" height="80">
<table width="360" border="0" cellspacing="0" cellpadding="0">
<tr><td colspan="2" height="8"></td></tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="205"><a href="JavaScript:goView('relation/event/','','12','','','','')">[깜짝이벤트] 10만번째 가입 행운상</a></td>
<td width="140">2003-10-01~2003-12-31</td>
</tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="205"><a href="JavaScript:goView('relation/event/','','11','','','','')">[깜짝이벤트] 가입추천 릴레이</a></td>
<td width="140">2003-10-01~2003-12-31</td>
</tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="205"><a href="JavaScript:goView('relation/event/','','10','','','','')">[깜짝이벤트] 내가 만드는 배움나라</a></td>
<td width="140">2003-10-01~2003-11-30</td>
</tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="205"><a href="JavaScript:goView('relation/event/','','9','','','','')">[정기이벤트] 포인트상</a></td>
<td width="140">2003-04-01~2003-12-31</td>
</tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="205"><a href="JavaScript:goView('relation/event/','','8','','','','')">[정기이벤트] 교육후기상</a></td>
<td width="140">2003-04-01~2003-12-31</td>
</tr>
<tr><td colspan="2" height="8"></td></tr>
</table>
</td>
<td width="1" bgcolor="#E8E8E8"></td>
</tr>
<tr><td colspan="3" height="1" bgcolor="E8E8E8"></td></tr>
</table>
</div>
==========================================
==========================================
<html>태그 끝나고 페이지 제일 하단부에 적는것입니다
<map name="Map">
<area shape="rect" coords="3,2,125,36" href="help/news/" onmouseover="MM_showHideLayers('me1','','show','me2','','hide')">
<area shape="rect" coords="125,2,255,36" href="#" onmouseover="MM_showHideLayers('+ 'me1'+ ','','hide','me2','','show')">
</map>
어렵사리 소스를 알아냈는데..
이걸 어떻게 응용해야할지 모르겠어요
이래저래 생각많이해보면서 적용을 해봤는데.. 뭐가 잘못된건지 몰라도
안되네요 경험 많으신분이나 흥미 있으신분 한번 써보시고 어떻게 하면될지
팁좀 부탁드려요
==========================================
==========================================
헤더 부분에 삽입해야하는내용입니다
<script language="javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}
</script>
==========================================
==========================================
본문에 삽입되는, 겸치는 레이어 두개 입니다 최근게시물 로그인 등등 많은부분에 응용가능해보이네요..
<div id="me1" style="position:absolute; left:198px; top:282px; width:580; z-index:1">
<table width="381" border="0" cellspacing="0" cellpadding="0" height="95">
<tr>
<td colspan="3" height="26" background="img/bac_0001.gif">
<a href="help/news/"> <img src="http://www.estudy.or.kr/usr/gene/img/notice-on.gif" border="0" alt="알려 드립니다." usemap="#Map" align="absmiddle"> </a>
</td>
</tr>
<tr height="95">
<td width="1" bgcolor="#E8E8E8"></td>
<td width="379" align="center" valign="top" height="80">
<table width="360" border="0" cellspacing="0" cellpadding="0">
<tr><td colspan="2" height="8"></td></tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="275"><a href="JavaScript:goView('help/news/','vi','204','','','','')"><b><font color="#339966">[축하] 정기이벤트 (7월~9월) 대상 발표</a></td>
<td width="70">2003-10-09</td>
</tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="275"><a href="JavaScript:goView('help/news/','vi','203','','','','')"><font color="#CC6699"><b>[안내] 패밀리21, 인터넷쇼핑몰 창업교육 </a></td>
<td width="70">2003-10-06</td>
</tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="275"><a href="JavaScript:goView('help/news/','vi','202','','','','')"><font color=blue><b>[알림]정보화상담 일반상담가 모집 결과발표</a></td>
<td width="70">2003-10-04</td>
</tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="275"><a href="JavaScript:goView('+ '+ 'help/news/','vi','199','','','','')"><FONT color=#6666fd><B>[공지] 10월 무료 온라인교육 수강신청 안내 </a></td>
<td width="70">2003-09-29</td>
</tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="275"><a href="JavaScript:goView('help/news/','vi','198','','','','')"><B><font color="#9900CC">[깜짝이벤트] 배움가족 10만명 돌파 기념!!!</a></td>
<td width="70">2003-09-26</td>
</tr>
<tr><td colspan="2" height="8"></td></tr>
</table>
</td>
<td width="1" bgcolor="#E8E8E8"></td>
</tr>
<tr><td colspan="3" height="1" bgcolor="E8E8E8"></td></tr>
</table>
</div>
<div id="me2" style="position:absolute; left:198px; top:282px; width:580; z-index:1;visibility:hidden;">
<table width="381" border="0" cellspacing="0" cellpadding="0" height="95">
<tr>
<td colspan="3" height="26" background="img/bac_0001.gif">
<img src="http://www.estudy.or.kr/usr/gene/img/notice-on.gif" border="0" alt="알려 드립니다." usemap="#Map" align="absmiddle">
</td>
</tr>
<tr height="95">
<td width="1" bgcolor="#E8E8E8"></td>
<td width="379" align="center" valign="top" height="80">
<table width="360" border="0" cellspacing="0" cellpadding="0">
<tr><td colspan="2" height="8"></td></tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="205"><a href="JavaScript:goView('relation/event/','','12','','','','')">[깜짝이벤트] 10만번째 가입 행운상</a></td>
<td width="140">2003-10-01~2003-12-31</td>
</tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="205"><a href="JavaScript:goView('relation/event/','','11','','','','')">[깜짝이벤트] 가입추천 릴레이</a></td>
<td width="140">2003-10-01~2003-12-31</td>
</tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="205"><a href="JavaScript:goView('relation/event/','','10','','','','')">[깜짝이벤트] 내가 만드는 배움나라</a></td>
<td width="140">2003-10-01~2003-11-30</td>
</tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="205"><a href="JavaScript:goView('relation/event/','','9','','','','')">[정기이벤트] 포인트상</a></td>
<td width="140">2003-04-01~2003-12-31</td>
</tr>
<tr height="21">
<td width="15"><img src="img/ico_0001.gif" width="9" height="9" border="0" align="absmiddle"></td>
<td width="205"><a href="JavaScript:goView('relation/event/','','8','','','','')">[정기이벤트] 교육후기상</a></td>
<td width="140">2003-04-01~2003-12-31</td>
</tr>
<tr><td colspan="2" height="8"></td></tr>
</table>
</td>
<td width="1" bgcolor="#E8E8E8"></td>
</tr>
<tr><td colspan="3" height="1" bgcolor="E8E8E8"></td></tr>
</table>
</div>
==========================================
==========================================
<html>태그 끝나고 페이지 제일 하단부에 적는것입니다
<map name="Map">
<area shape="rect" coords="3,2,125,36" href="help/news/" onmouseover="MM_showHideLayers('me1','','show','me2','','hide')">
<area shape="rect" coords="125,2,255,36" href="#" onmouseover="MM_showHideLayers('+ 'me1'+ ','','hide','me2','','show')">
</map>
댓글 2
-
Z
2003.10.11 10:43
감사합니다. 이소스 꼭 필요했었는데.. -
스티치
2003.10.12 07:54
그렇게 복잡한건 아니고..
최근게시물을 두개쓰는데.. 그 두개를 각각의 레이어에 넣고 레이어를 showhide시켜서.. 보였다 안보였다 하게 만드는 겁니다.
지금 있는 이 소스만으로도 충분하겠네요