'분류 전체보기'에 해당되는 글 92건

  1. 2010.12.19 Yes24 에러
  2. 2010.11.16 MySql DATE_FORMAT
  3. 2010.11.06 MySql insert select
  4. 2010.10.09 Side Tab
  5. 2010.10.09 div가운데 정렬
  6. 2010.10.07 팝업 띄우기 주소보안 방법.
  7. 2010.09.26 말풍선 그럴싸한거
  8. 2010.09.26 유용한 놈들
  9. 2010.09.12 jQuery Plug-in
  10. 2010.09.10 JSP 달력 만들기

Yes24 에러

카테고리 없음 2010. 12. 19. 05:30 |
http://www.yes24.com/SearchCenter/OzSearchResult.aspx?keywordAd=&keyword=&txt_pd=1&txt_at=1&txt_pu=1&txt_sj=0&txt_morpheme=0&qdomain=%B1%B9%B3%BB%B5%B5%BC%AD&qsort=1&query=mysql

->
System.FormatException: 입력 문자열의 형식이 잘못되었습니다. at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at Yes24.search.OzSearchResult.OzSearchResult_Goods(String KeyWord, String qdomain, String addr, Int32 port, String& sErrMsg) 


Posted by 기계식키보드
:

MySql DATE_FORMAT

카테고리 없음 2010. 11. 16. 11:08 |
DATE_FORMAT(date,format) 

%M  Month name (January..December)   
%W  Weekday name (Sunday..Saturday)   
%D  Day of the month with English suffix (1st, 2nd, 3rd, etc.)   
%Y  Year, numeric, 4 digits   
%y  Year, numeric, 2 digits   
%X  Year for the week where Sunday is the first day of the week, numeric, 4 digits, used with \'%V\'   
%x  Year for the week, where Monday is the first day of the week, numeric, 4 digits, used with \'%v\'   
%a  Abbreviated weekday name (Sun..Sat)   
%d  Day of the month, numeric (00..31)   
%e  Day of the month, numeric (0..31)   
%m  Month, numeric (01..12)   
%c  Month, numeric (1..12)   
%b  Abbreviated month name (Jan..Dec)   
%j  Day of year (001..366)   
%H  Hour (00..23)   
%k  Hour (0..23)   
%h  Hour (01..12)   
%I  Hour (01..12)   
%l  Hour (1..12)   
%i  Minutes, numeric (00..59)   
%r  Time, 12-hour (hh:mm:ss [AP]M)   
%T  Time, 24-hour (hh:mm:ss)   
%S  Seconds (00..59)   
%s  Seconds (00..59)   
%p  AM or PM   
%w  Day of the week (0=Sunday..6=Saturday)   
%U  Week (0..53), where Sunday is the first day of the week   
%u  Week (0..53), where Monday is the first day of the week   
%V  Week (1..53), where Sunday is the first day of the week. Used with \'%X\'   
%v  Week (1..53), where Monday is the first day of the week. Used with \'%x\'   
%%  A literal `%\'.  
Posted by 기계식키보드
:

MySql insert select

Tip 2010. 11. 6. 15:13 |
insert시 max()+1을 할경우가 생겨서 다음과 같이 날렸다.

INSERT INTO rankmanage (rank,category,refseq)
  SELECT max(rank)+1, 'categoryname', 113
  FROM rankmanage
  limit 1

'Tip' 카테고리의 다른 글

css fiexed  (0) 2011.03.31
크로스도메인 쿠키문제  (0) 2011.01.21
div가운데 정렬  (0) 2010.10.09
말풍선 그럴싸한거  (0) 2010.09.26
JSP 달력 만들기  (0) 2010.09.10
Posted by 기계식키보드
:

Side Tab

JavaScript 2010. 10. 9. 18:10 |
종종 나오는 케이스라서 기록해 놓는다. C&P방법론 적용하여 구현하자.
모양은 아래와 같다.
우측 탭 마우스 오버시 왼쪽 이미지가 변한다.



한 방에 긁어 성공하려면 이미지 이름이 다음과 같이 되어야 한다.
왼쪽 큰 이미지 >> 이미지 이름 끝에 1~n까지의 순번 부여 
<img id="changeImage" src="/images/fortune/gunghap_box1.gif" />
(gunghap_box2, gunghap_box3, gunghap_box4 ...)

오른 쪽 탭 이미지 >> over이미지일 경우이미지 명이  ov.gif, 아닐경우 or.gif로 끝나게
<img src="/images/fortune/gunghap_index_tab01ov.gif" class="imgOv" />
<img src="/images/fortune/gunghap_index_tab02or.gif" class="imgOv"  />
<img src="/images/fortune/gunghap_index_tab03or.gif" class="imgOv"  />
<img src="/images/fortune/gunghap_index_tab04or.gif" class="imgOv"  />


구현 소스는 다음과 같다.
----------------------------------------------------------------------------------
$("img.imgOv")
.addClass("pointer")
.bind('mouseover', function(){
$("img.imgOv").map(function(){
$(this).attr('src',$(this).attr('src').replace('ov.gif','or.gif'));
});
$(this).attr('src',$(this).attr('src').replace('or.gif','ov.gif'));


var idx = $("img.imgOv").index(this); $("#changeImage").attr('src', '/images/fortune/gunghap_box'+(idx+1)+'.gif'); $("#changeImage").show();
});

'JavaScript' 카테고리의 다른 글

jquery live  (0) 2011.05.20
세션유지  (0) 2010.12.20
팝업 띄우기 주소보안 방법.  (0) 2010.10.07
유용한 놈들  (0) 2010.09.26
jQuery Plug-in  (0) 2010.09.12
Posted by 기계식키보드
:

div가운데 정렬

Tip 2010. 10. 9. 00:05 |
from 네이년 지식인

<div style="height:200px; margin:0 auto; border:1px solid #000000;text-align:center">
  <div style="width:500px; border:1px solid #000000;">test</div>
</div>

안먹히는 이유는!! 아주 간단합니다.

부모 div에 margin:0 auto;를 아무리 줘도 소용이 없습니다.
이유는 부모 div에 width값이 없기 때문이죠.
자식 div에 margin:0 auto;를 줘보세요.

수정된 코드는 아래와 같습니다.

<div style="height:200px; border:1px solid #000000;text-align:center">
  <div style="width:500px; margin:0 auto; border:1px solid #000000;">test</div>
</div>

'Tip' 카테고리의 다른 글

크로스도메인 쿠키문제  (0) 2011.01.21
MySql insert select  (0) 2010.11.06
말풍선 그럴싸한거  (0) 2010.09.26
JSP 달력 만들기  (0) 2010.09.10
CSS 말줄임표(...) div 와 table 에 적용하기  (0) 2010.09.01
Posted by 기계식키보드
:
 


음 이건 그냥 동료에게 배운 편법이다.

현재 보통 팝업창을 뛰울때 
window.open(url,name,option); 
을 이용해서 팝업을 띄우기 마련이다.

하지만 url에 parameter들을 달고 가면 IE7부터는 주소창 보안에 걸리기 마련이다.

자 이츰해서 과연 어떻게 해야될까...

방법은 의외로 간단하다.
window.open('',name,option)
document.form 네임.target = name;
document.form 네임.method = post;
document.form 네임.action = 페이지;
document.form 네임.submit();

이렇게 되면 먼저 name이라는 이름을 가지는 팝업을 띄운 다음에
그 창을 타겟삼아서 submit을 시켜버린다.
이렇게 되면 일일히 parameter를 달고 갈 필요가 없어서 주소창 보안이 된다.
parameter가 많이 선언된 경우에는 속도쪽 문제를 감안해야되지만 
parameter의 값이 한글인 경우에도 어느정도 편하게 사용 할 수 있습니다!!

'JavaScript' 카테고리의 다른 글

세션유지  (0) 2010.12.20
Side Tab  (0) 2010.10.09
유용한 놈들  (0) 2010.09.26
jQuery Plug-in  (0) 2010.09.12
jQuery UI Tab Header 없애기  (1) 2010.08.31
Posted by 기계식키보드
:

말풍선 그럴싸한거

Tip 2010. 9. 26. 15:40 |
크롬 영어사전 확장 기능에서 띄어지는 노란 말풍선인데 그럴싸해서 기록해 놓는다.
우상단의 X이미지는 못가져왔다. 크롬 설치 경로의 어딘가에 위치하고 있을 것 같다.

<!-- Rectangle -->
<div style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 191); border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; height: auto; line-height: normal; text-align: left; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(225, 198, 66); border-right-color: rgb(225, 198, 66); border-bottom-color: rgb(225, 198, 66); border-left-color: rgb(225, 198, 66); color: rgb(0, 0, 0); opacity: 0.96; padding-top: 7px; padding-right: 7px; padding-bottom: 7px; padding-left: 7px; position: absolute; width: 250px; z-index: 99997; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; border-bottom-right-radius: 5px 5px; border-bottom-left-radius: 5px 5px; top: 483px; left: 198.5px; background-position: initial initial; background-repeat: initial initial; " class="gd-bubble">
<div style="background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 191); border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; text-align: left; float: right; margin-top: -3px; margin-right: -3px; margin-bottom: 7px; margin-left: 7px; width: 8px; height: 8px; background-image: url(chrome-extension://bmggpkflfmibiknebjkmjfnomnipcnhi/close-x.png); cursor: pointer; background-position: initial initial; background-repeat: no-repeat no-repeat; "></div>
<div style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 191); border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; height: auto; line-height: normal; text-align: left; width: auto; background-position: initial initial; background-repeat: initial initial; ">
No definition found.
</div>
<div style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 191); border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: arial, sans-serif; font-style: normal; font-variant: normal; font-weight: normal; height: auto; line-height: normal; color: rgb(102, 102, 102); float: left; font-size: 11px; margin-right: 8px; margin-top: 4px; overflow-x: hidden; overflow-y: hidden; text-align: left; white-space: nowrap; width: 200px; display: none; background-position: initial initial; background-repeat: initial initial; ">
<a style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 191); border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: arial, sans-serif; font-style: normal; font-variant: normal; font-weight: normal; height: auto; line-height: normal; text-align: left; width: auto; display: inline; text-decoration: underline; font-size: 11px; color: rgb(0, 102, 0); " target="_blank"></a>
</div>
<div style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 191); border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: arial, sans-serif; font-style: normal; font-variant: normal; font-weight: normal; height: auto; line-height: normal; text-align: left; width: auto; font-size: 11px; margin-top: 4px; float: right; display: block; background-position: initial initial; background-repeat: initial initial; ">
<a style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 191); border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: arial, sans-serif; font-style: normal; font-variant: normal; font-weight: normal; height: auto; line-height: normal; text-align: left; width: auto; display: inline; text-decoration: underline; font-size: 11px; color: rgb(0, 0, 204); " target="_blank" href="http://www.google.com/search?q=firstDayOfMonth">http://www.url.com</a>
</div>
</div>
<!--// Rectangle -->
<!-- Arrow -->
<div style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; height: auto; line-height: normal; text-align: left; position: absolute; width: 0px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; top: 533px; left: 320.5px; background-position: initial initial; background-repeat: initial initial; ">
<div style="border-bottom-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; height: auto; line-height: normal; text-align: left; position: absolute; width: 0px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; border-left-width: 9px; border-left-style: solid; border-left-color: transparent; border-right-width: 9px; border-right-style: solid; border-right-color: transparent; left: 3px; z-index: 99999; border-top-width: 9px; border-top-style: solid; border-top-color: rgb(255, 255, 191); background-position: initial initial; background-repeat: initial initial; ">
</div>
<div style="border-bottom-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; height: auto; line-height: normal; text-align: left; position: absolute; width: 0px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; border-left-width: 12px; border-left-style: solid; border-left-color: transparent; border-right-width: 12px; border-right-style: solid; border-right-color: transparent; z-index: 99998; border-top-width: 12px; border-top-style: solid; border-top-color: rgb(225, 198, 66); background-position: initial initial; background-repeat: initial initial; ">
</div>
</div>
<!--// Arrow -->
No definition found.

'Tip' 카테고리의 다른 글

크로스도메인 쿠키문제  (0) 2011.01.21
MySql insert select  (0) 2010.11.06
div가운데 정렬  (0) 2010.10.09
JSP 달력 만들기  (0) 2010.09.10
CSS 말줄임표(...) div 와 table 에 적용하기  (0) 2010.09.01
Posted by 기계식키보드
:

유용한 놈들

JavaScript 2010. 9. 26. 15:06 |
String.prototype.number_format=function(){
  return this.replace(/(\d)(?=(?:\d{3})+(?!\d))/g,'$1,');
}

String.prototype.trim = function() {
  return this.replace(/^\s+|\s+$/g, "");
}

String.prototype.strip_tags = function(){
  return this.replace(/<\/?[^>]+>/gi, '');
}

String.prototype.only_number = function(){
  return this.replace(/[^0-9\.]/gi, '');
}

String.prototype.only_number_dot = function(){
  return this.replace(/[^0-9\.]/gi, '');
}

String.prototype.only_eng_number = function(){
  return this.replace(/[^0-9A-Za-z]/gi, '');
}

// 텍스트박스에 기본값이 넣어져 있고, 포커스가 오면 기본 값을 없앤다. 의외로 유용함
var isInit = new Array();
$("input.required")
.each(function(idx){
isInit.push(false);
$(this).bind('focus', function(){
if( isInit[idx] == false ) {
isInit[idx]=true;
$(this).val('');
}
});
});

'JavaScript' 카테고리의 다른 글

Side Tab  (0) 2010.10.09
팝업 띄우기 주소보안 방법.  (0) 2010.10.07
jQuery Plug-in  (0) 2010.09.12
jQuery UI Tab Header 없애기  (1) 2010.08.31
jQuery 1.4변경사항  (0) 2010.08.30
Posted by 기계식키보드
:

jQuery Plug-in

JavaScript 2010. 9. 12. 15:01 |
from
http://affo.springnote.com/pages/5597897





'JavaScript' 카테고리의 다른 글

팝업 띄우기 주소보안 방법.  (0) 2010.10.07
유용한 놈들  (0) 2010.09.26
jQuery UI Tab Header 없애기  (1) 2010.08.31
jQuery 1.4변경사항  (0) 2010.08.30
유용한 놈들(jQuery)  (0) 2010.08.27
Posted by 기계식키보드
:

JSP 달력 만들기

Tip 2010. 9. 10. 22:10 |
맘에 쏙드는 그런 코드가 없어 직접 만들었다. 잼있긴 하지만 시간 아깝다ㅠㅠ

contentArea와 li의 width를 잘 조절해야 한 행에 한 주가 표시된다.
서블릿에서 firstDayOfMonth, lastDayOfMonth 두 값만 세팅해 주면 된다.

ex)
Calendar calendar = Calendar.getInstance ();
calendar.setTime ( new Date() );
int firstDayOfMonth = calendar.get(Calendar.DAY_OF_WEEK)-1;
int
lastDayOfMonth
lastDayOfMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);

<style>
.contentArea {
width:890px;
padding:10px 30px 0 20px;
margin:0 4px;
}

.calendar {
list-style: none;
padding: 0;
margin: 0;
}

.calendar li {
display: inline;
list-style: none;
float: left;
width: 120px;
margin: 0 4px 2px 0;
color: #3e3e3e;
font: 12px Arial, Helvetica, sans-serif;
text-align: left;
border: 1px solid #d8d8d8;
}
</style>

<div class="contentArea">
<ul class="calendar">
<li>일</li><li>월</li><li>화</li><li>수</li><li>목</li><li>금</li><li>토</li>
<c:forEach var="data" begin="1" end="${
firstDayOfMonth
firstDayOfMonth}" step="1" varStatus="status" >
<li>-</li>
</c:forEach>
<c:forEach var="data" begin="1" end="${
lastDayOfMonth
lastDayOfMonth}" step="1" varStatus="status" >
<li style="height: 120px;">${status.count}</li>
</c:forEach> 
</ul>
</div>

'Tip' 카테고리의 다른 글

크로스도메인 쿠키문제  (0) 2011.01.21
MySql insert select  (0) 2010.11.06
div가운데 정렬  (0) 2010.10.09
말풍선 그럴싸한거  (0) 2010.09.26
CSS 말줄임표(...) div 와 table 에 적용하기  (0) 2010.09.01
Posted by 기계식키보드
: