2007년 9월 29일 토요일

[jQuery] Submit form

# post에 전송할 params 생성
var params = {};

$(this)
    .find("input[@checked], input[@type='text'], input[@type='hidden'], input[@type='password'], input[@type='submit'], option[@selected], textarea")
    .filter(":enabled")
    .each(
    function()
    {
       params[ this.name || this.id || this.parentNode.name || this.parentNode.id ] = this.value; }
 );

#================================================================
Add a "curWait" class to the body, giving a hourglass symbol
$("body").addClass("curWait");

Post, via AJAX to the current form's action ("dbFormSubmission"), adding a "?call=ajax" to the URL
$.post(this.getAttribute("action") + "?call=ajax", params, function(xml){

[open api] 오예~ 다음 검색

2007년 9월 28일 금요일

[jQuery] 테이블의 홀,짝의 배경색 변경

가독성 있는 테이블을 만들려면, 다른 클래스 이름을 테이블의 모든 짝수 또는 홀수 행에 붙인다. 이를 다른 말로 테이블의 스트라이핑(striping)이라고 한다. jQuery를 사용하면 :odd pseudo-selector 덕택에 쉽게 수행할 수 있다. 아래 예제는 테이블의 모든 홀수 행의 백그라운드를 striped 클래스를 사용하여 변경한다.

$('table.striped > tr:odd').css('background', '#999999');

2007년 9월 27일 목요일

한글의 처리

javascript에서 server로 전송할 경우

encodeURIComponent(form.object.value);


server쪽에서 decode할 경우

UTF-8 로 iconv를 사용해서 convert

$content= iconv("UTF-8", "CP949", $content);


2007년 9월 20일 목요일

query결과 file 저장 샘플

SELECT seq,pack,trans_no,collect_date,trans_date_pos,status,order_cs,trans_who INTO OUTFILE '/tmp/out1.csv'
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\r\n'
FROM orders where trans_date_pos > '2007-9-4 00-00-00' and trans_date_pos<'2007-9-6 23:59:59' ;

2007년 9월 19일 수요일

엄마 다 했어~

익현이가 몸이 안 좋아서 연속 몇일째 이불에 쉬를 하고 있다.
몸이 안 좋으니 짜증이 늘어가는 듯.

이부자리에서 우유를 먹으려고 하고..

급기야 이불에 오줌을 한 가득 싸고는 "엄마 다 했어~~" 쿨~~~~

죽은 여배우 특집인가?

아침에 일어나 습관처럼 tv를 켰다.
super action이랑 ocn인가에서..

주홍글씨와 그놈은 멋있었다를 하고 있었다...
비몽사몽간 뭐냐...자살 여배우 특집이냐?~~를 생각했다.