Skip to content
조회 수 5101 추천 수 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. 22
    Jul 2015
    14:20

    PHP5.4.4 form 변수 전달받기(get, post방식)

    CategoryHTMLPHPMSQL Views8332
    Read More
  2. 22
    Jul 2015
    03:43

    2015-07-22 신규매수 종목

    Category주식 Views771
    Read More
  3. 21
    Jul 2015
    02:05

    2015-7-21 대박 나는날

    Category주식 Views744
    Read More
  4. 20
    Jul 2015
    23:07

    구글 스프레드시트(Google Spreadsheet)를 데이터베이스로 활용하기

    Category[Docs]스프레드시트 Views5101
    Read More
  5. 20
    Jul 2015
    07:15

    2015-7-20 허탈한 하루

    Category주식 Views660
    Read More
  6. 18
    Jul 2015
    06:32

    PC에 안드로이드 설치하기

    Category컴퓨터잡담 Views5443
    Read More
  7. 17
    Jul 2015
    08:38

    2015-7-17

    Category주식 Views744
    Read More
  8. 16
    Jul 2015
    06:16

    2015-7-16 오늘 대박

    Category주식 Views663
    Read More
  9. 16
    Jul 2015
    02:37

    관심종목

    Category주식 Views480
    Read More
  10. 13
    Jul 2015
    23:23

    파일 업로드 폴더 변경

    CategoryServer Views1956
    Read More
Board Pagination Prev 1 ... 96 97 98 99 100 ... 235 Next
/ 235

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소