고객센터 : 031-548-0481 /호스팅문의:1644-2646 /서버호스팅문의 : 070-7573-5515/ 평일근무 : 09:00~18:00 / 토/일요일, 공휴일 휴무

1:1 고객상담문의 FAQ 자동답변

나노코팅 나노엔

구매안내

  • 아티보드 2.0
  • 아티보드 3.0
  • 아티카페
  • 파일공유사이트
솔루션 > 커뮤니티 > 사용팁

사용팁|

StrBoardId가 다른 갤러리게시판들 최신 6개 뽑아 스크롤링 시키기(허접해서죄송 ㅠㅠ)|아티보드2.0

  • 조성범
  • |조회수 : 3030
  • |추천수 : 0
  • |2007-06-14 오후 2:15:11
<!-- #include file = "Dbconnect/Dbconnect.asp" -->
<!-- #include file = "Library/Function.asp" -->
<script language=javascript>
<!--
var downLayerId;
var dropDegree = 5; //스크롤 속도
var doDirect;
var DirectTerm = 2000; //스크롤 지연시간
var curDropIdx = 0;
function DirectDown()
{
clearInterval(doDirect);
clearInterval(downLayerId);
for(i = curDropIdx ;i < document.all["DropHit"].length + curDropIdx;i++){
  document.all["DropHit"][i%document.all["DropHit"].length].style.posTop = document.all["DropHit"][i%document.all["DropHit"].length].style.posHeight * (-1*((i-curDropIdx)%document.all["DropHit"].length));
}
var temp = 'setInterval("DownLayer()",20)';
downLayerId = eval(temp);
direction = "down";
}
function DownLayer()
{
if(document.all["DropHit"][curDropIdx].style.posTop < document.all["DropHit"][curDropIdx].style.posHeight){
  for(j = curDropIdx ;j < document.all["DropHit"].length + curDropIdx;j++){
   document.all["DropHit"][j%document.all["DropHit"].length].style.posTop += dropDegree;
  }
}else{
  clearInterval(downLayerId);
  for(j = curDropIdx ;j < document.all["DropHit"].length + curDropIdx;j++){
   document.all["DropHit"][j%document.all["DropHit"].length].style.posTop = document.all["DropHit"][j%document.all["DropHit"].length].style.posHeight *((-1*((j-curDropIdx)%document.all["DropHit"].length))+1);
  }
  curDropIdx = (curDropIdx + 1) ;
  curDropIdx = curDropIdx > document.all["DropHit"].length-1 ? curDropIdx%document.all["DropHit"].length:curDropIdx;
  var temp = 'setInterval("DirectDown()",DirectTerm)';
  doDirect = eval(temp);
}
}
function DirectUp()
{
clearInterval(doDirect);
clearInterval(downLayerId);
var tempIdx = 0;
for(i = 0;i<document.all["DropHit"].length;i++){
  tempIdx = (document.all["DropHit"].length + curDropIdx - i) %document.all["DropHit"].length;
  document.all["DropHit"][tempIdx].style.posTop = i*document.all["DropHit"][tempIdx].style.posHeight;
}
var temp = 'setInterval("UpLayer()",20)';
downLayerId = eval(temp);
direction = "up";
}
function UpLayer()
{
var tempIdx = 0;
if(document.all["DropHit"][curDropIdx].style.posTop < document.all["DropHit"][curDropIdx].style.posHeight && document.all["DropHit"][curDropIdx].style.posTop > document.all["DropHit"][curDropIdx].style.posHeight * (-1)){
  for(j = 0 ;j < document.all["DropHit"].length;j++){
   tempIdx = (document.all["DropHit"].length + curDropIdx - j) %document.all["DropHit"].length;
   document.all["DropHit"][tempIdx].style.posTop -= dropDegree;
  }
}else{
  clearInterval(downLayerId);
  for(j = 0;j<document.all["DropHit"].length;j++){
   tempIdx = (document.all["DropHit"].length + curDropIdx - j) % document.all["DropHit"].length;
   document.all["DropHit"][tempIdx].style.posTop = (j-1)*(document.all["DropHit"][tempIdx].style.posHeight);
  }
  curDropIdx = (curDropIdx - 1) ;
  curDropIdx = curDropIdx < 0 ? document.all["DropHit"].length-1:curDropIdx;
  var temp = 'setInterval("DirectUp()",DirectTerm)';
  doDirect = eval(temp);
}
}
//-->
</script>
<link href="CSS/style.css" rel="stylesheet" type="text/css" />
<body onLoad="DirectUp();">
<%
 SET RS = DBCON.EXECUTE("select top 6 intSeq, strBoardID, strName, strSubject, strContent, strFileImage = (select top 1 strFileName from mplus_board_file where strFileCode = mplus_board.strFileCode), dateRegDate from mplus_board where strBoardID like '58gallery%' AND [bitDelete] = 0 AND [bitBad] = 0 AND [bitCheck] = 1 order by intSeq desc")
 IF

댓글 3

겔러리 게시판이 그럼 6개가 존재해야 하는지요 1개를 쓰고있

  • 최백호
  • 2007.06.21 11:11
<% SET RS = DBCON.EXECUTE("select top 6 intSeq, strBoardID, strName, strSubject, strContent, strFileImage = (select top 1 strFileName from mplus_board_file where strFileCode = mplus_board.strFileCode), dateRegDate from mplus_board where strBoardID like '58gallery%' AND [bitDelete] = 0 AND [bitBad] = 0 AND [bitCheck] = 1 order by intSeq desc") IF RS.EOF THEN

수정 삭제

소스를 테이블에 삽입을 했는데 위 아래로 2개가 한번에 나오고 다음에는 중간에 한번 이렇게 스크롤이 됩니다. position:absolute로 하면 왼쪽 위 모퉁이에 정상적으로 스크롤이 되는데 positio

번호 제목 닉네임 조회수 작성일
55 자동등업 개선판 [3] file 최경수 2484 2007.07.10
54 많이클릭한 내용중에 오늘것만 출력이 되게하는 방안~ [4] 박인영 2368 2007.06.28
53 많이 클릭한 게시글 뽑기중.. 김광철 2317 2007.06.26
StrBoardId가 다른 갤러리게시판들 최신 6개 뽑아 스크롤링 시.. [3] 조성범 3030 2007.06.14
51 첨부 파일 다운로드시 포인트 삭감 처리 개선 [1] 박인영 2553 2007.06.07
50 부하를 줄여서 만들어 봤습니다.^^ [4] 웹아티 2509 2007.06.05
49 회원랭킹 소스 입니다.[별루 안좋은딩] [1] 박인영 2459 2007.06.04
48 아티보드 오늘 생일자 목록 뽑기 [3] file 웹아티 2692 2007.05.30
47 정식 싸이트 개설했습니다. 많이들 놀러 오세요... [3] 박인영 2825 2007.05.29
46 자동등업 방법[조금 무식한 방법입니다.] [8] file 박인영 2635 2007.05.24
45 nmail을 사용하시면서 아팁보드에서 메일발송시 HTML형태로 발송이.. [1] 김유진 2830 2007.05.12
44 나누미 프로시져 입니다. 많은 활용하세요 [6] file 박인영 3726 2007.05.11
43 조회수별, 코멘트 글수별 게시글 추출 소스입니다. [2] file 천명관 2778 2007.02.26
42 메인에 작은 달력(스케줄) 뽑기 [4] file 웹아티 3290 2007.02.20
41 ABC 업로드 컴포넌트 4.1 ^^ [3] file 김통령 4183 2007.01.31
40 설치시 db연결 관련 오류 나시는 분들은 이렇게 해보심이... 하늘의태양 2977 2007.01.10
39 달력스킨에서 데이터를 뽑아서 사용할시 링크방법 [2] 홍정우 2682 2007.01.08
38 리플달린 시간과 분 표시 하기 [3] 홍정우 2453 2006.12.29
37 아티보드 DB이전 방법 [5] 웹아티 3439 2006.11.06
36 이미지 + 원하는 게시판에서 글 추출하기 [3] 에버클럽 3255 2006.10.24