본문 바로가기

Ajax7

PHP 객체지향 방식으로 Mysql Ajax 조회 추가 수정 삭제 PHP 객체지향 방식으로 Mysql Ajax 조회 추가 수정 삭제 #화면 #mysql #경로 #index.php 2017. 9. 18.
ajax 와 json 을 통해 동적으로 url을 제어하고 데이터를 받아오기 간단예제 ajax 와 json 을 통해 동적으로 url을 제어하고 데이터를 받아오기 간단예제 #동작화면 #파일 경로 #index.htmlDOCTYPE html> json and ajax json and ajax 3마리 동물을 봅시다! #main.js var pageCounter = 1;var animalContainer = document.getElementById('animal-info');var btn = document.getElementById("btn"); //3마리 동물 버튼이 클릭됐을때 ajax를 통해서 json 파일을 가져온다.btn.addEventListener("click",function(){ var ourRequest = new XMLHttpRequest();//받을때 GET, 보낼때 POS.. 2017. 9. 11.
[node js] 자바스크립트 동적구현&함수에 값넣고 호출 할때 에러해결 동적쿼리 생성 output += ''; } 문제는 음...동적쿼리를 생성하고 ...ajax로 값을 받아와서 동적 쿼리에 넣어 그 값을 함수에 던져준다...숫자는 잘들어가지는데 문자를 던지니깐 계속 에러가 났다.출력해보니..... undefind 하면서 정의 할 수 없다고.. 3시간 넘게 삽질했다.. 그래서 구글링!!!인자 사이에 \'' 요런걸 넣어라네.....갈길이 멀다.ㅠㅠ *참고acceptedYou need to wrap the input item.store_code with quotation marks; otherwise, it tries to treat it as a variable, not a string:html += ''; 2017. 6. 14.
[node js] ajax 초 간단 예제 view- server 부분/*ajax 테스트 로직*/ router.get('/getajax', function(req, res, next) { res.render("main/ajax");}); /* POST 호출 처리 */router.post('/ajax', function(req, res, next) { console.log('POST 방식으로 서버 호출됨'); //view에 있는 data 에서 던진 값을 받아서 var msg = req.body.msg; msg = '[에코]' + msg; //json 형식으로 보내 준다. res.send({result:true, msg:msg});}); 2017. 6. 5.
12.JSP - 로그인 & AJAX 비동기 방식으로 처리&암호화&정규표현식 1.로그인 페이지 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103Insert title here $(document).ready(function() { alert("오잉"); $("#btnLogin").click(function() { var userid = $("#userid").val(); var passwd = $("#passwd").val(); if (userid == "") { alert.. 2016. 11. 14.
10.JSP - 한줄메모 삽입 & AJAX 한줄메모 삽입 & AJAX INDEX.JSP 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119Insert title here $(document).ready(function(){ memo_list(); //추가버튼 클릭 이벤트 $("#btnAdd").click(function (){ memo_insert(); }).. 2016. 11. 10.
7.JSP - 한줄메모 목록 리스트 AJAX 1.INDEX.JSP 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354Insert title here $(document).ready(function(){ memo_list(); }); function memo_list(){ //함수 $.ajax({ //함수의 파라미터 url: "/memo_servlet/list.do", success : function(result) { //result : Response Text (서버의 응답텍스트) // div의 내용을 교체함 $("#divList").html(result); } }) } 한줄메모장 이곳에 목록이 출력됩니다. Colored.. 2016. 11. 10.