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

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

나노코팅 나노엔

구매안내

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

사용팁|

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

  • 조성범
  • |조회수 : 3035
  • |추천수 : 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

번호 제목 닉네임 조회수 작성일
75 주민번호 뒷자리 나오는 방법. [2] photo 김통령 2904 2006.01.03
74 실시간 검색어 순위 순서대로 보여주기 최백호 2924 2011.11.25
73 클럽 출석부 입니다. 참고 하세요!!!!!! [6] 박인영 2930 2007.10.01
72 UTF-8 <--> ANSI 상호 변환 프로그램 [3] file photo 최백호 2950 2008.11.14
71 아티보드 전체게시글 검색 프로그램 입니다. [2] file 웹아티 2960 2006.02.22
70 도메인 네임만 계속 나오도록하는 팁~[별루지만 사용중입니다.] [3] 박인영 2969 2007.11.29
69 설치시 에러나시는 분들만 보세요 [1] file 김상현 2974 2006.04.10
68 웹아티에서 사용되는 스크롤 최신글 입니다. [5] file 웹아티 2976 2007.09.20
67 게시글 프린트 관련 자료입니다^^ [자찬:강추] [4] file 박인영 2980 2007.10.06
66 설치시 db연결 관련 오류 나시는 분들은 이렇게 해보심이... 하늘의태양 2983 2007.01.10
65 아티보드 전체 검색 프로그램입니다. [3] file 웹아티 2993 2006.09.06
64 아티보드를 이용한 이미지 멀티미디어 만들기^^ [9] file 박인영 3006 2007.09.21
63 설문조사 메인에 뽑기 소스 입니다. [3] file 웹아티 3016 2006.05.23
62 ASP - FSO 객체 정리한 파일입니다. file photo 최백호 3025 2008.05.19
StrBoardId가 다른 갤러리게시판들 최신 6개 뽑아 스크롤링 시.. [3] 조성범 3035 2007.06.14
60 windows server 2008 에서의 iis7에서 asp 작동시.. [1] Skynote 3056 2011.06.27
59 IE패치로 인한 플래쉬/미디어 제대로 나오게하기!!! [2] file 최백호 3076 2008.04.10
58 네이버검색, 다음검색, RSS를 내 홈페이지에 적용~~ [3] file 배영근 3087 2007.11.22
57 [강좌/팁]아티보드 저장프로시져 활용 1탄 [2] 박인영 3091 2007.10.13
56 로그인 섹션이 끝어질때..경험글 [3] 노영준 3096 2006.03.06