묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
스크립트 에러 꼭 잡고 싶습니다.
2004.06.11 09:06
어디를 잘못 썼는지 에러가 납니다....
메뉴에 마우스만 올리면 스크립트 에러가... ㅠ.ㅜ
고수님들 도와 주세요.. 아래가 에러나는 페이지 주소이고, 그 밑에가 소스입니다.
http://jikili.com/aaa/aaa.htm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<SCRIPT language=JavaScript>
<!--
function na_restore_img_src(name, nsdoc)
{
var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
if (name == '')
return;
if (img && img.altsrc) {
img.src = img.altsrc;
img.altsrc = null;
}
}
function na_preload_img()
{
var img_list = na_preload_img.arguments;
if (document.preloadlist == null)
document.preloadlist = new Array();
var top = document.preloadlist.length;
for (var i=0; i < img_list.length; i++) {
document.preloadlist[top+i] = new Image;
document.preloadlist[top+i].src = img_list[i+1];
}
}
function na_change_img_src(name, nsdoc, rpath, preload)
{
var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
if (name == '')
return;
if (img) {
img.altsrc = img.src;
img.src = rpath;
}
}
// -->
</SCRIPT>
</HEAD>
<BODY leftmargin="0" marginwidth="0" topmargin="0" marginheight="0">
<table cellpadding="0" cellspacing="0" width="809" border=0>
<tr>
<td>
<img src=http://jikili.com/test2/img/1.jpg border=0><A onmouseover="na_change_img_src('image1', 'document', 'http://jikili.com/test2/img/2_up.gif', true);MM_showHideLayers('Layer1','','show','Layer2','','hide','Layer3','','hide','Layer4','','hide','Layer5','','hide','Layer6','','hide')" onfocus=this.blur() onmouseout="na_restore_img_src('image1', 'document')" href="http://jikili.com/test2/main.php"><img src=http://jikili.com/test2/img/2.gif border=0 name=image1></a><A onmouseover="na_change_img_src('image2', 'document', 'http://jikili.com/test2/img/3_up.gif', true);MM_showHideLayers('Layer1','','hide','Layer2','','show','Layer3','','hide','Layer4','','hide','Layer5','','hide','Layer6','','hide')" onfocus=this.blur() onmouseout="na_restore_img_src('image2', 'document')" href="../bbs/zboard.php?id=notice_ch"><img src=http://jikili.com/test2/img/3.gif border=0 name=image2></a><A onmouseover="na_change_img_src('image3', 'document', 'http://jikili.com/test2/img/4_up.gif', true);MM_showHideLayers('Layer1','','hide','Layer2'+ '+ ','','hide','Layer3','','show','Layer4','','hide','Layer5','','hide','Layer6','','hide')" onfocus=this.blur() onmouseout="na_restore_img_src('image3', 'document')" href="../bbs/zboard.php?id=guest_ch"><img src=http://jikili.com/test2/img/4.gif border=0 name=image3></a><A onmouseover="na_change_img_src('image4', 'document', 'http://jikili.com/test2/img/5_up.gif', true);MM_showHideLayers('Layer1','','hide','Layer2'+ ','','hide','Layer3','','hide','Layer4','','show','Layer5','','hide','Layer6','','hide')" onfocus=this.blur() onmouseout="na_restore_img_src('image4', 'document')" href="../bbs/zboard.php?id=study_ch"><img src=http://jikili.com/test2/img/5.gif border=0 name=image4></a><A onmouseover="na_change_img_src('image5', 'document', 'http://jikili.com/test2/img/6_up.gif', true);MM_showHideLayers('Layer1','','hide','Layer2'+ ','','hide','Layer3','','hide','Layer4',''+ ','hide','Layer5','','show','Layer6','','hide')" onfocus=this.blur() onmouseout="na_restore_img_src('image5', 'document')" href="../bbs/zboard.php?id=goodthink"><img src=http://jikili.com/test2/img/6.gif border=0 name=image5></a><A onmouseover="na_change_img_src('image6', 'document', 'http://jikili.com/test2/img/7_up.gif', true);MM_showHideLayers('Layer1','','hide','Layer2','','hide','Layer3','','hide','Layer4','','hide','Layer5','','hide','Layer6','','show')" onfocus=this.blur() onmouseout="na_restore_img_src('image6', 'document')" href="../bbs/zboard.php?id=gallery_child"><img src=http://jikili.com/test2/img/7.gif border=0 name=image6></a>
</td>
</tr>
</table>
</BODY>
</HTML>
메뉴에 마우스만 올리면 스크립트 에러가... ㅠ.ㅜ
고수님들 도와 주세요.. 아래가 에러나는 페이지 주소이고, 그 밑에가 소스입니다.
http://jikili.com/aaa/aaa.htm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<SCRIPT language=JavaScript>
<!--
function na_restore_img_src(name, nsdoc)
{
var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
if (name == '')
return;
if (img && img.altsrc) {
img.src = img.altsrc;
img.altsrc = null;
}
}
function na_preload_img()
{
var img_list = na_preload_img.arguments;
if (document.preloadlist == null)
document.preloadlist = new Array();
var top = document.preloadlist.length;
for (var i=0; i < img_list.length; i++) {
document.preloadlist[top+i] = new Image;
document.preloadlist[top+i].src = img_list[i+1];
}
}
function na_change_img_src(name, nsdoc, rpath, preload)
{
var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
if (name == '')
return;
if (img) {
img.altsrc = img.src;
img.src = rpath;
}
}
// -->
</SCRIPT>
</HEAD>
<BODY leftmargin="0" marginwidth="0" topmargin="0" marginheight="0">
<table cellpadding="0" cellspacing="0" width="809" border=0>
<tr>
<td>
<img src=http://jikili.com/test2/img/1.jpg border=0><A onmouseover="na_change_img_src('image1', 'document', 'http://jikili.com/test2/img/2_up.gif', true);MM_showHideLayers('Layer1','','show','Layer2','','hide','Layer3','','hide','Layer4','','hide','Layer5','','hide','Layer6','','hide')" onfocus=this.blur() onmouseout="na_restore_img_src('image1', 'document')" href="http://jikili.com/test2/main.php"><img src=http://jikili.com/test2/img/2.gif border=0 name=image1></a><A onmouseover="na_change_img_src('image2', 'document', 'http://jikili.com/test2/img/3_up.gif', true);MM_showHideLayers('Layer1','','hide','Layer2','','show','Layer3','','hide','Layer4','','hide','Layer5','','hide','Layer6','','hide')" onfocus=this.blur() onmouseout="na_restore_img_src('image2', 'document')" href="../bbs/zboard.php?id=notice_ch"><img src=http://jikili.com/test2/img/3.gif border=0 name=image2></a><A onmouseover="na_change_img_src('image3', 'document', 'http://jikili.com/test2/img/4_up.gif', true);MM_showHideLayers('Layer1','','hide','Layer2'+ '+ ','','hide','Layer3','','show','Layer4','','hide','Layer5','','hide','Layer6','','hide')" onfocus=this.blur() onmouseout="na_restore_img_src('image3', 'document')" href="../bbs/zboard.php?id=guest_ch"><img src=http://jikili.com/test2/img/4.gif border=0 name=image3></a><A onmouseover="na_change_img_src('image4', 'document', 'http://jikili.com/test2/img/5_up.gif', true);MM_showHideLayers('Layer1','','hide','Layer2'+ ','','hide','Layer3','','hide','Layer4','','show','Layer5','','hide','Layer6','','hide')" onfocus=this.blur() onmouseout="na_restore_img_src('image4', 'document')" href="../bbs/zboard.php?id=study_ch"><img src=http://jikili.com/test2/img/5.gif border=0 name=image4></a><A onmouseover="na_change_img_src('image5', 'document', 'http://jikili.com/test2/img/6_up.gif', true);MM_showHideLayers('Layer1','','hide','Layer2'+ ','','hide','Layer3','','hide','Layer4',''+ ','hide','Layer5','','show','Layer6','','hide')" onfocus=this.blur() onmouseout="na_restore_img_src('image5', 'document')" href="../bbs/zboard.php?id=goodthink"><img src=http://jikili.com/test2/img/6.gif border=0 name=image5></a><A onmouseover="na_change_img_src('image6', 'document', 'http://jikili.com/test2/img/7_up.gif', true);MM_showHideLayers('Layer1','','hide','Layer2','','hide','Layer3','','hide','Layer4','','hide','Layer5','','hide','Layer6','','show')" onfocus=this.blur() onmouseout="na_restore_img_src('image6', 'document')" href="../bbs/zboard.php?id=gallery_child"><img src=http://jikili.com/test2/img/7.gif border=0 name=image6></a>
</td>
</tr>
</table>
</BODY>
</HTML>
댓글 2
-
새우깡
2004.06.11 12:02
-
지키리
2004.06.11 13:35
좋은 지적 감사합니다.
덕분에 원인을 찾았답니다. ^^
<script language="javascript">
<!--
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; }
}
function MM_findObj(n, d) { //v3.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); return x;
}
//-->
</script>
근데 레이어는 없는거 같은데..
첫번째 버턴에 클릭하면 레이어 1은 보여주고 나머지 레이어는 감추는..그런 스크립인데
Layer1 Layer2 Layer3~~` 이런 이름의 레이어가 존재하지 않는거 같은데요..
저도 초보라 ^ㅡ^