묻고답하기

첫번째 소스는 scroll1.html 이라고 iframe 안에서 gallery.htm을 불러들여 갤러리를 스크롤 해주고 있는데요 이게 IE11에서는 동작하지만 크롬/파이어팍스에선 동작하지 않습니다. 이게 왜 동작을 하지 않는지 하루 종일 궁리해 봐도 모르겠네요. 어떤 웹표준 문제인것 같은데 어디가 틀렸는지 모르겠습니다.


해당 소스를 링크해 드립니다. http://www.blrun.net/temp/scroll1.html


scroll1.html

<table width="440" border="0" cellspacing="0" cellpadding="0">
	<tr> 
	  <td width=246 valign="top">
		<table width="246" border="0" cellspacing="0" cellpadding="0" height="154">
		  <tr> 
			<td colspan="3"><img src="/images/gallery/1.gif" width="246" height="21"></td>
		  </tr>
		  <tr> 
			<td width="22"><img src="/images/gallery/3.gif" width="22" height="111"></td>
			<td width="193" height="111"><iframe border="0" frameborder="0" marginwidth="0" scrolling="no" src="/temp/gallery.htm" width="193" height="111" marginhieght="0" name="main"></iframe></td>
			<td width="31"><img src="/images/gallery/4.gif" width="31" height="111"></td>
		  </tr>
		  <tr> 
			<td colspan="3"><img src="/images/gallery/2.gif" width="246" height="22"></td>
		  </tr>
		</table>
	  </td>
	</tr>
</table>


gallery.htm

<html>
<head>
	<title>www.happyscript.com</title>
</head>

<body>
<script language="JavaScript">

var scrollerwidth=193 //SIZE
var scrollerheight=111 //SIZE
var scrollerbgcolor='FFFFFF' 
var pausebetweenimages=2000 
var slideimages=new Array() 
slideimages[0]='<img src="/images/gallery/1.jpg" border="0">' 
slideimages[1]='<img src="/images/gallery/2.jpg" border="0">' 
slideimages[2]='<img src="/images/gallery/3.jpg" border="0">' 
if (slideimages.length>1) 
	i=2 
else 
	i=0 

function move3(whichdiv){ 
	tdiv=eval(whichdiv) 
	if (tdiv.style.pixelLeft>0&&tdiv.style.pixelLeft<=5){ 
		tdiv.style.pixelLeft=0 
		setTimeout("move3(tdiv)",pausebetweenimages) 
		setTimeout("move4(second2)",pausebetweenimages) 
		return 
	} 
	if (tdiv.style.pixelLeft>=tdiv.offsetWidth*-1){ 
		tdiv.style.pixelLeft-=5 
		setTimeout("move3(tdiv)",100) 
	} 
	else{ 
		tdiv.style.pixelLeft=scrollerwidth 
		tdiv.innerHTML=slideimages[i] 
		if (i==slideimages.length-1) 
			i=0 
		else 
			i++ 
	} 
} 

function move4(whichdiv){ 
	tdiv2=eval(whichdiv) 
	if (tdiv2.style.pixelLeft>0&&tdiv2.style.pixelLeft<=5){ 
		tdiv2.style.pixelLeft=0 
		setTimeout("move4(tdiv2)",pausebetweenimages) 
		setTimeout("move3(first2)",pausebetweenimages) 
		return 
	} 
	if (tdiv2.style.pixelLeft>=tdiv2.offsetWidth*-1){ 
		tdiv2.style.pixelLeft-=5 
		setTimeout("move4(tdiv2)",100) 
	} 
	else{ 
		tdiv2.style.pixelLeft=scrollerwidth 
		tdiv2.innerHTML=slideimages[i] 
		if (i==slideimages.length-1) 
			i=0 
		else 
			i++ 
	} 
} 

function startscroll(){ 
	if (document.documentElement){ 
		move3(first2) 
		second2.style.left=scrollerwidth
	} 
} 

window.onload=startscroll 

</script>

<ilayer id="main" width=&{scrollerwidth}; height=&{scrollerheight}; bgcolor=&{scrollerbgcolor}; visibility=hide> 
<layer id="first" left="1" top="0" width="1" height="200" z-index="1" ></layer>
<layer id="second" left="0" top="0" width="1" height="200" z-index="1"></layer>
</ilayer>

<script language="JavaScript"> 

if (document.documentElement){ 
	document.writeln('<span id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hidden;background-color:'+scrollerbgcolor+'">') 
	document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0;top:0">') 
	document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:1;top:0;">') 
	document.write(slideimages[0]) 
	document.writeln('</div>') 
	document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0;top:0">') 
	document.write(slideimages[1]) 
	document.writeln('</div>') 
	document.writeln('</div>') 
	document.writeln('</span>') 
} 

</script>

</body>
</html>

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
우람 홈페이지 이전 가능한가요??? [1] 2015.09.24 by 로이조52
푸리지아 xe에서 모바일 홈페이지가 보이지 않게 하려합니다. 도와주세요~~~~ 플리즈 [2] 2015.09.24 by 푸리지아
플라이sinji html안에 xe게시판을 넣고 싶은데.. [2] 2015.09.24 by Double'U'
마래바 에디터가 열리지 않는 현상은 어떻게 해결해야 할까요? [1] file 2015.09.24 by 마래바
다함께 다음tv팟의 동영상 링크에 문제가... [2] 2015.09.24 by 다함께
해피라니 인터넷 관리공단이라는 곳에서.... [3] 2015.09.24 by Double'U'
울보왕자 테이블 'xe_ducuments'는 읽기전용입니다. [2] 2015.09.24 by 울보왕자
o*** 문서페이지 작업중 텍스트 내용이 많으면 등록이 안되는 현상  
YuriStella 작성 댓글 보기의 영문 표기가 안되네요 [4] file 2015.09.24 by YuriStella
레샤엘 '홈페이지로 사용' 적용시 질문이요. [1] 2015.09.24 by 레샤엘
Apple 글작성후 자동 새로고침.. [6] 2015.09.24 by Lansi
벼리507 카페24 이전후 ..글쓸때 무한로딩이 생겼습니다..  
리예 'xedition 수정 레이아웃'에서 메인 페이지 편집하기 [1] file 2015.09.23 by 힝고
동산바치 게시판 글쓰기에서 sql syntax error 생겨요 [4] 2015.09.23 by 동산바치
first 도메인/호스팅 질문 드립니다 [2] 2015.09.23 by first
하루 회원정보변경 페이지에서 프로필 어떻게 불러오나요? [3] 2015.09.23 by 하루
은정월드 XE4 게시판스킨 이제 못들어가나요? [1] 2015.09.23 by Lansi
jhy**** 버전 업그래이드 후 홈피가 사라짐 [3] 2015.09.23 by 기진곰
벼리507 위젯으로 이런거 표현되나요? 포인트 순위인데 기간을 정해서  
소정 모바일 게시판 정말 궁금해서 그러는데요.. [4] 2015.09.23 by 소정