Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

this is my ajax script which i used in codeigniter to send form data without page refresh now i want to know how can i submit form in cakephp 2x using ajax.. i dont want to use cakephp helper or other difficult methods which i find difficult ... please do some changes in this script or if is possible to send data through changes of this script little bit because i find this easy ...

     $('#submit').click(function() {
       form = $("#form").serialize();

     $.ajax({
       type: "POST",
       url: "<?php  echo site_url('categoryController/addCategory'); ?>",
       data: form,

       success: function(data){

           $(".success").fadeIn(500).delay(2000).fadeOut(500);
           $("#form")[0].reset();

       }

     });
     event.preventDefault();
     return false;  
  });

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.