daily pastebin goal
38%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(function(){
  2.  
  3.   function updater(){
  4.     $.getJSON('change_update.php',$(this).closest('form').serialize(),
  5.       function(res){
  6.         if(res.status == 'ok') {
  7.           $('#response').text('updated');
  8.           setTimeout(function(){$('#response').empty();},3000);
  9.         } else {
  10.           $('#response').text('ERROR: '+res.msg);
  11.         }
  12.       }
  13.     );
  14.   }
  15.  
  16.   $('input').change(updater);
  17.   $('select').change(updater);
  18.  
  19. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top