묻고답하기

자바스크립트를 사용하게 되면

일단 잘 적용은 됩니다.

오류없이

그런데 문제는 제로보드의 글을 볼때하고 글을 쓸때만 적용이 안됩니다.

그렇다고 특정 오류가 뜨는 것도 아니고.....

제생각에는 두부분의 변수 같은게 충돌나는게 아닌가 싶은데

제가 자바스크립트나 프로그래밍은 영 젬병이라서..

고수분들께 요청을 합니다.

이곳 질문, 답변 코너에 저랑 비슷한 경험을 하시는 분들이 계시는데

명쾌히 답변을 얻는 분들이 않계시는 것 같아

다시 질문을 올려 봅니다.

그리고 노프레임을 적용한 상태 입니다.

소스는 아래와 같습니다.

<html>
<head>

<SCRIPT LANGUAGE="JavaScript">
<!--
function MFXinitMenu(){
IE = document.all ? 1:0;
NN = document.layers ? 1:0;
HIDDEN = (NN) ? 'hide' : 'hidden';
VISIBLE = (NN) ? 'show' : 'visible';
myLayer=new Array();
mySpeed=1;
subLeft=0;
closes=true;


myLayer[0]=(NN) ? document.MFX0 : document.all.MFX0.style;
myLayer[1]=(NN) ? document.MFX1 : document.all.MFX1.style;
myLayer[2]=(NN) ? document.MFX2 : document.all.MFX2.style;
myLayer[3]=(NN) ? document.MFX3 : document.all.MFX3.style;
running=false;
whichOpen=-1;
lastMain=myLayer.length-2;
MFXmain=new Array();
for(i=0; i<myLayer.length; i++){
mainORsub= i % 2;
MFXmain[i] = mainORsub ? 0:1;
}
myTop=new Array();
myLeft=new Array();
myHeight=new Array();
myWidth=new Array();
mySlide=new Array();
for(i=0; i<myLayer.length; i++){
if(NN&&MFXmain[i]){
if(i==0){
myTop[i]=myLayer[i].top;
myLeft[i]=myLayer[i].left;}
else{
myLeft[i]=myLeft[i-2];
myTop[i]=myTop[i-2]+myHeight[i-2];}
myHeight[i]=myLayer[i].clip.height;
myWidth[i]=myLayer[i].clip.width;
myLayer[i].left=myLeft[i];
myLayer[i].top=myTop[i];
myLayer[i].visibility=VISIBLE;}
if(NN&&!MFXmain[i]){
myTop[i]=myTop[i-1]+myHeight[i-1];
myLeft[i]=myLeft[i-1];
myHeight[i]=myLayer[i].clip.height;
myWidth[i]=myLayer[i].clip.width;
mySlide[i]=myTop[i]+myHeight[i];
myLayer[i].left=myLeft[i]+subLeft;
myLayer[i].top=myTop[i];}
if(IE&&MFXmain[i]){
if(i==0){
myLeft[i]=myLayer[i].pixelLeft;
myTop[i]=myLayer[i].pixelTop;}
else{
myLeft[i]=myLeft[i-2];
myTop[i]=myTop[i-2]+myHeight[i-2];}
myHeight[i]=myLayer[i].pixelHeight;
myWidth[i]=myLayer[i].pixelWidth;
myLayer[i].left=myLeft[i];
myLayer[i].top=myTop[i];
myLayer[i].visibility=VISIBLE;}
if(IE&&!MFXmain[i]){
myTop[i]=myTop[i-1]+myHeight[i-1];
myLeft[i]=myLeft[i-1];
myHeight[i]=myLayer[i].pixelHeight;
myWidth[i]=myLayer[i].pixelWidth;
myLayer[i].pixelLeft=myLeft[i]+subLeft;
myLayer[i].pixelTop=myTop[i];
mySlide[i]=myTop[i]+myHeight[i];
}
}
}
function MFXrunMenu(myName,newspeed){
ieStep=0;
thereS=false;
thereC=false;
if(newspeed>0){mySpeed=newspeed;}
first=myName;
if(whichOpen==-1&&!running&&MFXmain[myName]&&!(whichOpen==myName)){
running=true;
if(NN){
myLayer[myName+1].clip.height=0;
myLayer[myName+1].visibility=VISIBLE;
}
if(IE){
myLayer[myName+1].clip= "rect(" + ("auto") +" "+ ("auto") +" "+ (0) +" "+ ("auto") +")";
myLayer[myName+1].visibility=VISIBLE;
}
MFXopenMenuS(myName);
MFXopenMenuC(myName);
}
if(whichOpen>=0&&!running&&!(whichOpen==myName)){
running=true;
second=whichOpen;
ieStep1=myHeight[second+1];
thereCS=false;
thereCC=false;
MFXcloseMenuS(second);
MFXcloseMenuC(second);
}
if(whichOpen>=0&&!running&&whichOpen==myName&&closes){
running=true;
second=whichOpen;
ieStep1=myHeight[second+1];
thereCS=false;
thereCC=false;
MFXcloseMenuS(second);
MFXcloseMenuC(second);
        }
}
function MFXstopCloseS(myName){
running=false;
thereCS=true;
if(closes&&first==whichOpen){whichOpen=-1;}
else{whichOpen=-1;
MFXrunMenu(first);
}
}
function MFXstopOpenS(myName){
running=false;
thereS=true;
if(IE){myLayer[myName+1].clip= "rect(" + ("auto") +" "+ ("auto") +" "+ ("auto") +" "+ ("auto") +")";}
whichOpen=myName;
}
function MFXopenMenuS(myName){
myStep=mySpeed;
if(NN&&!thereS&&!(first==lastMain)){
if(myLayer[first+2].top+myStep>mySlide[first+1]){
myStep=mySlide[first+1]-myLayer[first+2].top;
}
for(i=first+2; i<myLayer.length; i+=2){
myLayer[i].top+=myStep;
}
if(myLayer[first+2].top==mySlide[first+1]){
MFXstopOpenS(first)
}
if(running)setTimeout('MFXopenMenuS(first)',10);
}
if(IE&&!thereS&&!(first==lastMain)){
if(myLayer[first+2].pixelTop+myStep>mySlide[first+1]){
myStep=mySlide[first+1]-myLayer[first+2].pixelTop;
}
for(i=first+2; i<myLayer.length; i+=2){
myLayer[i].pixelTop+=myStep;
}
if(myLayer[first+2].pixelTop==mySlide[first+1]){
MFXstopOpenS(first)
}
if(running)setTimeout('MFXopenMenuS(first)',10);
}
}
function MFXopenMenuC(myName){
myStep=mySpeed;
if(NN&&!thereC){
if ((myLayer[first+1].clip.height+myStep)>myHeight[first+1]){
myLayer[first+1].clip.height=myHeight[first+1]
}
if(myLayer[first+1].clip.height==myHeight[first+1]){
thereC=true;
whichOpen=first;
MFXstopOpenS(first)

}else{
myLayer[first+1].clip.height+=myStep;

}
if(running)setTimeout('MFXopenMenuC(first)',10);
}
if(IE&&!thereC){
ieStep+=myStep;
myLayer[myName+1].clip= "rect(" + ("auto") +" "+ ("auto") +" "+ (ieStep) +" "+ ("auto") +")";

if(ieStep>=myHeight[first+1]){
thereC=true;
whichOpen=first;
MFXstopOpenS(first)
}
if(running)setTimeout('MFXopenMenuC(first)',10);
}
}
function MFXcloseMenuS(myName){
myStep=mySpeed;
if(NN&&!thereCS&&!(second==lastMain)){
if(myLayer[second+2].top-myStep<myTop[second+2]){
myStep=myLayer[second+2].top-myTop[second+2];
}
for(i=second+2; i<myLayer.length; i+=2){
myLayer[i].top-=myStep;

}
if(myLayer[second+2].top==myTop[second+2]){
MFXstopCloseS(second);
}
if(running)setTimeout('MFXcloseMenuS(second)',10);
}
if(IE&&!thereCS&&!(second==lastMain)){
if(myLayer[second+2].pixelTop-myStep<myTop[second+2]){
myStep=myLayer[second+2].pixelTop-myTop[second+2];
}
for(i=second+2; i<myLayer.length; i+=2){
myLayer[i].pixelTop-=myStep;

}
if(myLayer[second+2].pixelTop==myTop[second+2]){
MFXstopCloseS(second);
}
if(running)setTimeout('MFXcloseMenuS(second)',10);
}
}
function MFXcloseMenuC(myName){
myStep=-mySpeed;
ieStep1-=mySpeed;
if(NN&&!thereCC){
if ((myLayer[second+1].clip.bottom+myStep)<0){
myLayer[second+1].clip.bottom=0;
}
if(myLayer[second+1].clip.bottom==0){
thereCC=true;

if(second==lastMain)MFXstopCloseS(second);
}else{
myLayer[second+1].clip.bottom+=myStep;

}
if(running)setTimeout('MFXcloseMenuC(second)',10);
}
if(IE&&!thereCC){
if(ieStep1<=0){
myLayer[myName+1].clip= "rect(" + ("auto") +" "+ ("auto") +" "+ (0) +" "+ ("auto") +")";
thereCC=true;
if(second==lastMain)MFXstopCloseS(second);
}else{
myLayer[myName+1].clip= "rect(" + ("auto") +" "+ ("auto") +" "+ (ieStep1) +" "+ ("auto") +")";

}
if(running)setTimeout('MFXcloseMenuC(second)',10);
}
}
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];}
}
//-->
</SCRIPT>
</head>
<body onLoad="MFXinitMenu();MM_preloadImages('button-1-on.gif','button-2-on.gif','button-3-on.gif','button-4-on.gif','button-5-on.gif')">
<DIV id="MFX0" style="position:absolute; width:145px; height:42px; z-index:2; left:12px; top:228px; visibility: hidden; background-color: #FFFFFF; layer-background-color: #FFFFFF; border: 1px none #000000"><a onfocus=this.blur() href="#" onClick="MFXrunMenu(0,5)" onMouseOver="MM_swapImage('Image1','','[그림절대경로]',1)" onMouseOut="MM_swapImgRestore()"><img name=Image1 src="[그림절대경로]" width="145" height="42" border=0></a></DIV>



       <DIV id="MFX1" style="position:absolute; width:145PX; height:62px; z-index:1; left:12px; top:140px; visibility: hidden; background-color: #E9E8E2; layer-background-color: #E9E8E2; border: 1px none #000000">
<table>
<tr>
<td>
<a href="링크1"> <img src="[그림 절대경로]" border=0>  링크1</a>
</td>
</tr>
<tr>
<td height="1" width="145" background="[배경라인 절대경로]">
</td>
</tr>
<tr>
<td>
<a href="링크2"> <img src="[그림 절대경로]" border=0>  링크2</a>
</td>
</tr>
<tr>
<td height="1" width="145" background="[배경라인 절대경로]">
</td>
</tr>
<tr>
<td>
<a href="링크3"> <img src="[그림 절대경로]" border=0>  링크3</a>
</td>
</tr>
<tr>
<td height="1" width="145" background="[배경라인 절대경로]">
</td>
</tr>
</table>
</DIV>


<DIV id="MFX2" style="position:absolute; width:145px; height:42px; z-index:2; left:12px; top: 500px; visibility: hidden; background-color: #FFFFFF; layer-background-color: #FFFFFF; border: 1px none #000000"><a onfocus=this.blur() href="#" onClick="MFXrunMenu(2,5)" onMouseOver="MM_swapImage('Image2','','[그림절대경로]',1)" onMouseOut="MM_swapImgRestore()"><img name=Image2 src="[그림절대경로]" width="145" height="42" border=0></a></DIV>

        <DIV id="MFX3" style="position:absolute; width:145px; height:62px; z-index:1; left:50px; top: 2px; visibility: hidden; background-color: #E9E8E2; layer-background-color: #E9E8E2; border: 1px none #000000">
<table>
<tr>
<td>
<a href="링크4"> <img src="[그림 절대경로]" border=0>  링크4</a>
</td>
</tr>
<tr>
<td height="1" width="145" background="[배경라인 절대경로]">
</td>
</tr>
<tr>
<td>
<a href="링크5"> <img src="[그림 절대경로]" border=0>  링크5</a>
</td>
</tr>
<tr>
<td height="1" width="145" background="[배경라인 절대경로]">
</td>
</tr>
<tr>
<td>
<a href="링크6"> <img src="[그림 절대경로]" border=0>  링크6</a>
</td>
</tr>
<tr>
<td height="1" width="145" background="[배경라인 절대경로]">
</td>
</tr>
</table>
</DIV>

</body>
</html>

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
블랙잭1004 작성글 보기에서 태그 안 먹히게 하는 것 좀 알려주세요 [2] 2015.01.15 by 블랙잭1004
SUHONE 랭킹위젯안에 전체회원수를 넣을수 있을까요?  
귤까먹이 #이 붙은 링크가 오작동하는거 같습니다 [3] 2015.01.15 by 노에르
XEMANIA 프로필사진 이미지크기를 가져오려면? [1] 2015.01.15 by XESniper
schwarz bgm 플레이어가 익스플로러10에서 안되요 [2] 2015.01.15 by XESniper
게시판의 게시물마다 권한을 설정할 수는 없나요? [6] 2015.01.15 by 귤까먹이
간지횽 배경음악 BGM 넣는법 부탁드립니다. ㅠㅠ [1] 2015.01.15 by 머신건
fjgal 네이버 웹마스터도구 질문합니다  
oooook 질문 드려 죄송합니다. 한번만 보고 알려주세요 부탁드립니다. [1] file 2015.01.15 by imagineshop
잔비어 글 삭제를 누가 했는지 알수 있나요? [1] 2015.01.15 by sejin7940
티지레몬 xe 최신버젼에서 1.7.3 으로 다운그레이드 했는데 백지화네요ㅠ.ㅠ [1] 2015.01.15 by 티지레몬
SUHONE 게시물 본문에 포함도니 이미지 모바일/데스크탑 구분 출력할려면...  
제일파프 제로니모에 XE 올리는 방법 좀 알려주세요.(재게시)  
Pureunsoll 특정 단어를 입력하면 게시판 글 등록이 안되네요. [3] 2015.01.15 by Pureunsoll
지나김 1.7.9 위젯페이지 저장 안되는 문제??  
SUHONE 외부 링크로 이미지 삽입했을 경우... [1] 2015.01.15 by DECLK
베바보77 xe 구축 후 검색기능  
pcmanorg 움직이는 그림 효과 문의 드립니다. [4] 2015.01.15 by DoorWeb
찌수 페이스북에 링크를 올릴 때 페이지가 요약되어 미리보기처럼 나오게 하는 것 [3] 2015.01.15 by YJSoft
수달장군 게시글 삭제시 '테이블 xe_comments는 읽기전용입니다.