위 그림과같이 일정 갯수의 이미지를 호출하여 위로 무한 스크롤 되도록하는 팁입니다.
보통 쇼핑몰에서 많이들 사용하는 팁입니다. 아티보드를 이용해서 멋지게 만들어 보세요!!
<** language="JavaScript">
<!--
OVER1 = OVER2 = 1;
function banner_roll(DID, TNAME, HEIGHT, DELAY, SPEED, THEIGHT, CNT, START)
{
var div_tag = document.getElementById(DID);
var tag;
// 롤링 추가시 아래부분 추가
if(OVER1 > 0 && DID == "banner_1") THEIGHT++;
if(OVER2 > 0 && DID == "banner_2") THEIGHT++;
// 2라인 이상씩 롤링
if(CNT > 1) HEIGHT_ = HEIGHT * CNT;
else HEIGHT_ = HEIGHT;
if(THEIGHT < HEIGHT_)
{
if(START != 1)
{
div_tag.style.top = -THEIGHT;
setTimeout("banner_roll('" + DID + "', '" + TNAME + "', " + HEIGHT + ", " + DELAY + ", " + SPEED + ", " + THEIGHT + ", " + CNT + ", 0);", SPEED);
}
else
{
setTimeout("banner_roll('" + DID + "', '" + TNAME + "', " + HEIGHT + ", " + DELAY + ", " + SPEED + ", " + THEIGHT + ", " + CNT + ", 0);", DELAY);
}
}
else
{
tag = div_tag.getElementsByTagName(TNAME);
if(tag.length > 0) for(i=0;i<CNT;i++) div_tag.appendChild(tag[0]);
div_tag.style.top = 0;
setTimeout("banner_roll('" + DID + "', '" + TNAME + "', " + HEIGHT + ", " + DELAY + ", " + SPEED + ", 0, " + CNT + ", 0);", DELAY);
}
return true;
}
//-->
</**>
<div style="position:relative; width:420px; height:100px; overflow:hidden; left:0px;">
<div style="position:relative" id="banner_1">
<%
strBoardID = "image" '// 게시판 아이디
intCount = 12 '// 출력게시글 개수
intCategory = "0" '// 출력게시글 카테고리
SET RS = DBCON.EXECUTE("EXEC [MPLUS_GET_BOARD_LIST_NOTICE] '" & strBoardID & "', '" & intCategory & "', '" & intCount & "' ")
%>
a = 1
WHILE NOT(RS.EOF)
strStoreImg1 = "/Pds/'"&strBoardID&"'/Thrum/" & RS("strFilename")
IF strStoreImg1 = "" THEN strStoreImg1 = "/images/NoStoreImage.gif"
strSubject = RS("strSubject")
If ((a Mod 4) = 1) Then Response.Write "<table cellpadding='0' cellspacing='0' border='0' width='100%' height='" &(mainScrollHeight - 11) &"' align='center' **over='OVER1=0' **out='OVER1=1'><tr>"
Response.Write "<td width='100' valign='top' align='center' style='padding:2 2 2 2'>"
Response.Write "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"
Response.Write "<tr>"
Response.Write "<td width='90'><a class='c' href=Mboard.asp?exec=view&strBoardID="&strBoardID &"&intSeq="&rs("intSeq")&" target='_parent'><img src='"&strStoreImg1&"' width='90' height='70'></a></td>"
Response.Write "</tr>"
Response.Write "<tr>"
Response.Write "<tr><td colspan='3' height='20' align='center'><a class='c' href=Mboard.asp?exec=view&strBoardID="&strBoardID &"&intSeq="&rs("intSeq")&" target='_parent'>"&strSubject&"</a&g
이렇게 했는데 이미지만 보이고 잘 안되는데요.... 확인 부탁합니다.
<!--이미지 스크롤하기-->
<!-- #include file = "Dbconnect/DbConnect.asp" -->
<!-- #include file = "Library/Function.asp" -->
<link rel="stylesheet" type="text/css" href="Admin/Css/style.css">
<script language="JavaScript">
<!--
OVER1 = OVER2 = 1;
function banner_roll(DID, TNAME, HEIGHT, DELAY, SPEED, THEIGHT, CNT, START)
{
var div_tag = document.getElementById(DID);
var tag;
// 롤링 추가시 아래부분 추가
if(OVER1 > 0 && DID == "banner_1") THEIGHT++;
if(OVER2 > 0 && DID == "banner_2") THEIGHT++;
// 2라인 이상씩 롤링
if(CNT > 1) HEIGHT_ = HEIGHT * CNT;
else HEIGHT_ = HEIGHT;
if(THEIGHT < HEIGHT_)
{
if(START != 1)
{
div_tag.style.top = -THEIGHT;
setTimeout("banner_roll('" + DID + "', '" + TNAME + "', " + HEIGHT + ", " + DELAY + ", " + SPEED + ", "
+ THEIGHT + ", " + CNT + ", 0);", SPEED);
}
else
{
setTimeout("banner_roll('" + DID + "', '" + TNAME + "', " + HEIGHT + ", " + DELAY + ", " + SPEED + ", "
+ THEIGHT + ", " + CNT + ", 0);", DELAY);
}
}
else
{
tag = div_tag.getElementsByTagName(TNAME);
if(tag.length > 0) for(i=0;i<CNT;i++) div_tag.appendChild(tag[0]);
div_tag.style.top = 0;
setTimeout("banner_roll('" + DID + "', '" + TNAME + "', " + HEIGHT + ", " + DELAY + ", " + SPEED + ", 0,
" + CNT + ", 0);", DELAY);
}
return true;
}
//-->
</script>
<div style="position:relative; width:420px; height:100px; overflow:hidden; left:0px;" id="banner_1">
<%
strBoardID = "idleq04" '// 게시판 아이디
intCount = 12 '// 출력게시글 개수
intCategory = "0" '// 출력게시글 카테고리
SET RS = DBCON.EXECUTE("EXEC [MPLUS_GET_BOARD_LIST_NOTICE] '" & strBoardID & "', '" & intCategory &
"', '" & intCount & "' ")
a = 1
WHILE NOT(RS.EOF)
strStoreImg1 = "/Pds/'"&strBoardID&"'/Thrum/" & RS("strFilename")
IF strStoreImg1 = "" THEN strStoreImg1 = "/images/NoStoreImage.gif"
strSubject = RS("strSubject")
If ((a Mod 4) = 1) Then Response.Write "<table cellpadding='0' cellspacing='0' border='0' width='100%'
height='" &(mainScrollHeight - 11) &"' align='center' **over='OVER1=0' **out='OVER1=1'><tr>"
Response.Write "<td width='100' valign='top' align='center' style='padding:2 2 2 2'>"
Response.Write "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"
Response.Write "<tr>"
Response.Write "<td width='90'><a class='c' href=Mboard.asp?exec=view&strBoardID="&strBoardID
&"&intSeq="&rs("intSeq")&" target='_parent'><img src='"&strStoreImg1&"' width='90' height='70'></a></td>"
Response.Write "</tr>"
Response.Write "<tr>"
Response.Write "<tr><td colspan='3' height='20' align='center'><a class='c' href=Mboard.asp?
exec=view&strBoardID="&strBoardID &"&intSeq="&rs("intSeq")&"
target='_parent'>"&strSubject&"</a></td></tr>"
Response.Write "</table>"
Response.Write "</td>"
If ((a Mod 4) = 0) Then Response.Write "</tr></table>"
파일로 주세요...ㅠ
번호 | 제목 | 닉네임 | 조회수 | 작성일 | |
---|---|---|---|---|---|
95 | 메인에 작은 달력(스케줄) 뽑기 [4] | 웹아티 | 3296 | 2007.02.20 | |
94 | 모바일에서 글등록이 안되나요? [1] | 썰렁맨 | 2265 | 2015.05.26 | |
93 | 부하를 줄여서 만들어 봤습니다.^^ [4] | 웹아티 | 2515 | 2007.06.05 | |
92 | 사용자를 위한 팁 적용예... [3] | 리안 | 3263 | 2008.03.06 | |
91 | 사진첨부 오류 [2] | 최현석 | 2261 | 2016.05.19 | |
90 | 사진청부 오류 도와주세요 [4] | 김정만 | 2380 | 2016.07.16 | |
89 | 서버 2008에서 메일보내기입니다. [2] | 배영직 | 3785 | 2010.08.09 | |
88 | 설문조사 메인에 뽑기 소스 입니다. [3] | 웹아티 | 3018 | 2006.05.23 | |
87 | 설치매뉴얼에 잘못된 부분 | 김태원 | 3228 | 2005.12.29 | |
86 | 설치시 424에러가 뜰 경우 [3] | 행복한떠기 | 2827 | 2007.09.23 | |
85 | 설치시 에러나시는 분들만 보세요 [1] | 김상현 | 2975 | 2006.04.10 | |
84 | 설치시 db연결 관련 오류 나시는 분들은 이렇게 해보심이... | 하늘의태양 | 2984 | 2007.01.10 | |
쇼핑몰에서 많이 사용되는 최근이미지 세로 무한스크롤링법!! [11] | 박인영 | 3496 | 2007.11.07 | ||
82 | 스크립트가 먹히질 않습니다. | 이성제 | 2112 | 2014.07.06 | |
81 | 실시간 검색어 순위 순서대로 보여주기 | 최백호 | 2925 | 2011.11.25 | |
80 | 아티보드 2.0에서 3.1로 업그레이드 [1] | 와이즈 | 2270 | 2015.02.16 | |
79 | 아티보드 3.0 팝업 띠우기 | 일천 | 2747 | 2012.06.20 | |
78 | 아티보드 3.0 SSL로그인 | 일천 | 2511 | 2013.04.12 | |
77 | 아티보드 설치중에 자꾸이런오류가뜹니다.. [2] | 가리벙 | 2391 | 2014.09.12 | |
76 | 아티보드 스킨제작 1탄 [2] | 박인영 | 3160 | 2007.11.06 |
댓글 8