Advertisement
Guest User

session - cakephp issue

a guest
Mar 1st, 2013
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     $("input.submit-btn").click(function(event) {
  2.         event.preventDefault();
  3.      
  4.         var formData = $(this).parents('form').serialize();
  5.         //console.log(formData);
  6.         var url = "participants/ajax_index";
  7.  
  8.         $.post(url, {
  9.             //data: formData
  10.             data: formData
  11.         }, function(data) {
  12.  
  13.            
  14.             if (data == 1){
  15.                 share();
  16.                 $("#vote_container").remove();
  17.                 $("#thank_you_msg").show();
  18.             }
  19.             else{
  20.                  alert(data);
  21.             }
  22.          
  23.  
  24.         }, "html")
  25.         .done(function() {
  26.             console.info("second success");
  27.            
  28.          })
  29.         .fail(function(data) {
  30.             alert('fail');})
  31.         .always(function() { console.info("finished"); });
  32.        
  33.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement