Skip to content
조회 수 5099 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 첨부
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 첨부

참고글 : http://cocoabiscuit.tistory.com/42


구글 스프레드시트를 데이터베이스로 이용하기 - 1. ajax POST를 통한 기록 편

http://rocabilly.tistory.com/27



$.post() 방식

 

- 서버에 데이터를 HTTP POST 방식으로 전송한 후 서버측 응답 받을 때 사용

 

[형식]

jQuery.post( url [, data] [, success(data, textStatus, jqXHR)] [, dataType] )

 

- url : 요청 Url

- data : 요청과 함께 서버에 보내는 string 또는 map

- success(data,textStatus,jqXHR) : 요청이 성공일때 실행되는 callback 함수

- dataType : 서버에서 내려온 data 형식. ( default : xml,json,script,text,html )


 $.get() 방식

 

- 서버에 데이터를 HTTP GET 방식으로 전송한 후 서버측 응답 받을 때 사용

 

[형식]

jQuery.get(  url [, data] [, success(data, textStatus, jqXHR)] [, dataType] )

 

- url : 요청 Url

- data : 요청과 함께 서버에 보내는 string 또는 map

- success(data,textStatus,jqXHR) : 요청이 성공일때 실행되는 callback 함수

- dataType : 서버에서 내려온 data 형식. ( default : xml,json,script,text,html )



<script type="text/javascript">
    $("#form1").submit(function () {
        var jqxhr = $.post('api/updates/complex', $('#form1').serialize())
            .success(function () {
                var loc = jqxhr.getResponseHeader('Location');
                var a = $('<a/>', { href: loc, text: loc });
                $('#message').html(a);
            })
            .error(function () {
                $('#message').html("Error posting the update.");
            });
        return false;
    }); 

</script> 








MySQL 사용에 익숙한 분들은 바로 Google Visualization API Query Language(https://developers.google.com/chart/interactive/docs/querylanguage) 문서를 읽어보세요. 

쉽게 사용할 수 있을 겁니다.


해당 스프레드시트에 테스트를 위한 임의의 값을 입력하고 

'파일 > 공유 > 액세스 권한이 있는 사용자'의 설정을 '비공개'에서 '링크가 있는 모든 사용자에게 공개' 또는 '웹에 공개'로 변경합니다.



1.png  2.png


3.png


스프레드시트를 생성하면 https://docs.google.com/spreadsheet/ccc?key=ABCDE#gid=0 형태의 고유한 url을 가지게 되는데 여기서 key값인 ABCDE를 복사하세요.


로그인 후 댓글쓰기가 가능합니다.

?

  1. 07
    Mar 2012
    11:12

    IGMP, IGMP Snooping Internet Group Management Protocol 인터넷 그룹 관리 프로토콜

    Category컴퓨터잡담 Views7287
    Read More
  2. 06
    Mar 2012
    08:34

    autohotkey) 윈도우 ahk_id 추출하기

    CategoryAutoHotKey Views30088
    Read More
  3. 06
    Mar 2012
    08:05

    엑셀) 피벗테이블 원본데이터 영역범위 수정방법

    CategoryExcel Views25100
    Read More
  4. 02
    Mar 2012
    08:24

    탐색기 다른 이름으로 저장하기 저장위치 즐겨찾기 폴더 변경하기

    Category컴퓨터잡담 Views5294
    Read More
  5. 29
    Feb 2012
    14:43

    윈도우7 인터넷 속도 제한 해제(윈도우7 QOS 설정)

    Category컴퓨터잡담 Views20006
    Read More
  6. 28
    Feb 2012
    17:52

    XE) 관리자모드 업데이트가 안되는 이유

    Category컴퓨터잡담 Views5142
    Read More
  7. 25
    Feb 2012
    12:39

    인터넷 익스플러러 속도 향샹을 위한 팁

    Category컴퓨터잡담 Views24571
    Read More
  8. 23
    Feb 2012
    12:06

    엑셀) 배열

    CategoryExcel Views8353
    Read More
  9. 22
    Feb 2012
    08:19

    autohotkey) postmessage mouse control

    CategoryAutoHotKey Views28628
    Read More
  10. 22
    Feb 2012
    08:17

    16진수 헥사, 2진수, 10진수, 8진법 변환 계산기; Hex Calc

    Category컴퓨터잡담 Views7917
    Read More
  11. 22
    Feb 2012
    07:54

    autohotkey) WinSpector spy를 이용한 post,sendmessage Control ID 추출하기

    CategoryAutoHotKey Views10900
    Read More
  12. 22
    Feb 2012
    07:24

    Autohotkey) Find WM_COMMAND parameter with Winspector

    CategoryAutoHotKey Views35869
    Read More
  13. 14
    Feb 2012
    14:22

    부팅시 출력되는 메시지가 너무 빨리 지나가 볼수가 없때

    Category컴퓨터잡담 Views4428
    Read More
  14. 13
    Feb 2012
    14:01

    최근문서 지우기

    CategoryExcel Views9942
    Read More
  15. 13
    Feb 2012
    13:33

    MS Office 2007 Excel 최근 문서 목록 삭제하기

    CategoryExcel Views22229
    Read More
  16. 06
    Feb 2012
    15:24

    HMail Server 4.4.1 설치하기

    Category컴퓨터잡담 Views6904
    Read More
  17. 04
    Feb 2012
    16:29

    MYSQL 설정에 관한 조언

    Category컴퓨터잡담 Views4604
    Read More
  18. 31
    Jan 2012
    18:19

    캐논 IR-3300 복합기 스캔드라이버

    Category컴퓨터잡담 Views16314
    Read More
  19. 25
    Jan 2012
    17:51

    인터넷속도 단위

    Category컴퓨터잡담 Views6060
    Read More
  20. 23
    Jan 2012
    14:37

    IF문에서 변수와 상수 또는 변수와 변수 비교하기시 주의사항

    CategoryAutoHotKey Views6674
    Read More
Board Pagination Prev 1 ... 25 26 27 28 29 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소