자바스크립 이미지가 안뜨는 오류좀도와주세요.

· 14년 전 · 1163 · 1
다름이 아니라 자바스크립 소스를 사용해서 홈페이지매뉴를 만들려고하는데요.

나모웹에디터로 작동시키면 너무나도 작동이 잘됩니다. 이미지가 정상적으로 잘뜨구요.

그런데 이상하게 FTP에만 올리면 이미지가 안뜹니다ㅜ_ㅜ 이미지 경로도 이상해져버리고 왜이런지 도저히 모르겠습니다.

소스 첨부했습니다 ㅠ_ㅠ 좀 도와주세요.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr" />
<title>탭, 탭오버, 시간에 따라 변하는 탭(오버)</title>
<style type="text/css">
<!--
BODY { text-align: center; margin: 30px AUTO 0 AUTO; }
TD { font-family: Tahoma, "굴림", Gulim, sans-serif; font-size: 11px; line-height: 150%; font-weight: bold; text-decoration: none; }
-->
</style>
</head>

<body>
<script type="text/javascript">
var i,j;
function auto_tab(tag,tabno,no,no2,tagimg,imgstr){
eval("function autooff_"+no2+"(){clearTimeout(Auto"+no2+");}");
eval("autooff_"+no2+"();");
for(i=0;i<=tabno;i++){
overoff_img(document.getElementById(tagimg+i),imgstr);
document.getElementById(tag+i).style.display = "none";
}
overon_img(tagimg,document.getElementById(tagimg+no),imgstr,tabno);
document.getElementById(tag+no).style.display = "";
}

function autoTab_open(tag,tagimg,imgstr,tabno){
for(i=0;i<=tabno;i++){
if(i>tabno)i=0;
if(document.getElementById(tag+i).style.display == ""){
for(j=0;j<=tabno;j++){
overoff_img(document.getElementById(tagimg+j),imgstr);
document.getElementById(tag+j).style.display="none";
}
i=i+1;if(i>tabno){i=0;}
overon_img(tagimg,document.getElementById(tagimg+i),imgstr,tabno);
document.getElementById(tag+i).style.display = "";
}
}
}

function auto_mouseout(tag,tagimg,imgstr,tabno,second,no){
eval("function auto_"+no+"(){Auto"+no+" = setInterval(\"autoTab_open('"+tag+"','"+tagimg+"','"+imgstr+"',"+tabno+");\","+second*1000+");}");
eval("auto_"+no+"();");
}

function overon_img(tagimg,id,str,tabno){
var img = id.src;
var imgname = img.split(".");
id.src=imgname[0]+str+"."+imgname[1];
return true;
}

function overoff_img(id,str){
var img = id.src;
var imgname = img.split(".");
if(imgname[0].indexOf(str)){
var imagename = imgname[0].replace(str,"");
}else{
var imagename = imgname[0];
}
id.src=imagename+"."+imgname[1];
return;
}
</script>

<!-- 여백 Begin -->
<table width="500" border="0" cellspacing="0" cellpadding="0"><tr><td height="30"></td></tr></table>
<!-- 여백 End -->

<!-- 두번째 탭 Begin -->
<table border="0" cellspacing="0" cellpadding="0" style="margin:0 0 5px 0;">
<tr>
<td style="padding:0 5px 0 0;"><img src="01.jpg" id="img1_0" onmouseover="auto_tab('tab1_',2,0,1,'img1_','_1');" onmouseout="auto_mouseout('tab1_','img1_','_1',2,5,1);" style="cursor:pointer;" /></td>
<td style="padding:0 5px 0 0;"><img src="02.jpg" id="img1_1" onmouseover="auto_tab('tab1_',2,1,1,'img1_','_1');" onmouseout="auto_mouseout('tab1_','img1_','_1',2,5,1);" style="cursor:pointer;" /></td>
<td><img src="03.jpg" id="img1_2" onmouseover="auto_tab('tab1_',2,2,1,'img1_','_1');" onmouseout="auto_mouseout('tab1_','img1_','_1',2,5,1);" style="cursor:pointer;" /></td>
</tr>
</table>
<table width="500" border="0" cellspacing="0" cellpadding="0" id="tab1_0" style="display:;">
<tr>
<td style="border:1px solid #F7F7F7; height:100px; background-color:#FDF9DB">GUIDE 4초 간격</td>
</tr>
</table>
<table width="500" border="0" cellspacing="0" cellpadding="0" id="tab1_1" style="display:none;">
<tr>
<td style="border:1px solid #F7F7F7; height:100px; background-color:#FFF0FF">MAGIC 4초 간격</td>
</tr>
</table>
<table width="500" border="0" cellspacing="0" cellpadding="0" id="tab1_2" style="display:none;">
<tr>
<td style="border:1px solid #F7F7F7; height:100px; background-color:#F5F9FE">SHARP 4초 간격</td>
</tr>
</table>
<script type="text/javascript">
<!--
auto_mouseout('tab1_','img1_','_1',2,4,1); //4초
overon_img('img1_',document.getElementById("img1_0"),'_1',2);

/*
----------------------------------------------------------------------------------------
auto_mouseout(tag,tagimg,imgstr,tabno,second,no) : 마우스 아웃시 & 자동 스크립 시작시
----------------------------------------------------------------------------------------
tag : tab_1 이면 'tab_' 을 입력, 뒤쪽의 숫자는 0부터 시작해서 순차적으로 만들어줘야 함.
tagimg : 이미지 id 값에서 숫자를 뺀 값 ex) img_1 -> img_
imgstr : 마우스 오버아웃시의 이미지 파일에 연속적으로 들어갈 이미지 파일 이름
ex) 마우스 아웃 : 01.png / 마우스 오버 : 01_1.png일때
imgstr 값은 _1
tabno : tag의 id 값의 마지막 숫자
second : 자동 작은 탭 이동 시간 (초단위)
no : 탭이 여러개일 때 이용하는 큰 탭 번호


----------------------------------------------------------------------------------------
auto_tab(tag,tabno,no,no2,tagimg,imgstr) : 마우스 오버시 쓰이는 것
----------------------------------------------------------------------------------------
tag : tab_1 이면 'tab_' 을 입력, 뒤쪽의 숫자는 0부터 시작해서 순차적으로 만들어줘야 함.
tabno : tag의 id 값의 마지막 숫자
no : 작은 탭 번호
no2 : 탭이 여러개일 때 이용하는 큰 탭 번호
tagimg : 이미지 id 값에서 숫자를 뺀 값 ex) img_1 -> img_
imgstr : 마우스 오버아웃시의 이미지 파일에 연속적으로 들어갈 이미지 파일 이름
ex) 마우스 아웃 : 01.png / 마우스 오버 : 01_1.png일때
imgstr 값은 _1
----------------------------------------------------------------------------------------


----------------------------------------------------------------------------------------
overon_img(tagimg,id,str,tabno); : 마우스 오버시 쓰이는 것
----------------------------------------------------------------------------------------
tagimg : 이미지 id 값에서 숫자를 뺀 값 ex) img_1 -> img_
id : 이미지 id 값이 가장 첫번째
str : 마우스 오버아웃시의 이미지 파일에 연속적으로 들어갈 이미지 파일 이름
ex) 마우스 아웃 : 01.png / 마우스 오버 : 01_1.png일때
imgstr 값은 _1
tabno : tag의 id 값의 마지막 숫자
----------------------------------------------------------------------------------------
*/
-->
</script>
<!-- 두번째 탭 End --><div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 16:57:14 JavaScript에서 이동 됨]</div>

첨부파일

test.zip (6.2 KB) 10회 2011-03-27 12:39
|

댓글 1개

나모 웹에디터는 자동 함수를 만들어 주기때문에 드림위버 사용하시거나 태크 직접수정하는 편이 낳을듯하네요,
확인결과 TEST 파일다운 하여 FTP 직접올릴경우 잘되네요
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

태그 필터 (최대 3개) 전체 개발자 소스 기타 mysql 팁자료실 javascript php linux flash 정규표현식 jquery node.js mobile 웹서버 os 프로그램 강좌 썸네일 이미지관련 도로명주소 그누보드5 기획자 견적서 계약서 기획서 마케팅 제안서 seo 통계 서식 통계자료 퍼블리셔 html css 반응형 웹접근성 퍼블리싱 표준화 반응형웹 홈페이지기초 부트스트랩 angularjs 포럼 스크린리더 센스리더 개발자톡 개발자팁 퍼블리셔톡 퍼블리셔팁 기획자톡 기획자팁 프로그램강좌 퍼블리싱강좌
+
제목 글쓴이 날짜 조회
14년 전 조회 1,276
14년 전 조회 844
14년 전 조회 1,038
14년 전 조회 1,646
14년 전 조회 1,116
14년 전 조회 774
14년 전 조회 1,304
14년 전 조회 1,384
14년 전 조회 1,702
14년 전 조회 1,018
14년 전 조회 4,592
14년 전 조회 1,179
14년 전 조회 1,154
14년 전 조회 1,177
14년 전 조회 1,375
14년 전 조회 1,181
14년 전 조회 916
14년 전 조회 991
14년 전 조회 1,432
14년 전 조회 729
14년 전 조회 1,312
14년 전 조회 1,302
14년 전 조회 1,391
14년 전 조회 4,130
14년 전 조회 1,366
14년 전 조회 1,071
14년 전 조회 1,492
14년 전 조회 1,661
14년 전 조회 867
14년 전 조회 2,107
14년 전 조회 2,083
14년 전 조회 1,668
14년 전 조회 1,626
14년 전 조회 1,136
14년 전 조회 1,617
14년 전 조회 1,548
14년 전 조회 1,257
14년 전 조회 990
14년 전 조회 2,737
14년 전 조회 2,050
14년 전 조회 1,409
14년 전 조회 2,061
14년 전 조회 936
14년 전 조회 1,039
14년 전 조회 1,666
14년 전 조회 1,764
14년 전 조회 1,371
14년 전 조회 1,060
14년 전 조회 1,225
14년 전 조회 1,164
14년 전 조회 2,009
14년 전 조회 2,135
14년 전 조회 2,013
14년 전 조회 1,140
14년 전 조회 1,714
14년 전 조회 1,766
14년 전 조회 1,865
14년 전 조회 3,641
14년 전 조회 1,191
14년 전 조회 1,987
14년 전 조회 908
14년 전 조회 1,042
14년 전 조회 887
14년 전 조회 1,339
14년 전 조회 1,797
14년 전 조회 1,330
14년 전 조회 1,187
14년 전 조회 844
14년 전 조회 1,819
14년 전 조회 1,396
14년 전 조회 956
14년 전 조회 2,339
14년 전 조회 1,452
14년 전 조회 1,374
14년 전 조회 911
14년 전 조회 1,785
14년 전 조회 2,755
14년 전 조회 1,247
14년 전 조회 646
14년 전 조회 2,206
14년 전 조회 1,968
14년 전 조회 913
14년 전 조회 1,495
14년 전 조회 1,668
14년 전 조회 1,529
14년 전 조회 890
14년 전 조회 861
14년 전 조회 1,164
14년 전 조회 1,493
14년 전 조회 1,349
14년 전 조회 1,028
14년 전 조회 1,451
14년 전 조회 1,300
14년 전 조회 1,576
14년 전 조회 1,023
14년 전 조회 1,260
14년 전 조회 1,062
14년 전 조회 1,422
14년 전 조회 885
14년 전 조회 2,287