Advertisement
Guest User

Untitled

a guest
May 23rd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. jQuery("input[name=driverName]").keyup(function(){
  2.   var that = jQuery(this);
  3.   var data = {
  4.     validate: {
  5.       driver: {
  6.         driverName: that.attr('value')
  7.       }
  8.     }
  9.   };
  10.  
  11.   jQuery.ajax({
  12.     url: 'incident/validation',
  13.     dataType: 'json',
  14.     data: data,
  15.     success: function(aa) {
  16.       alert(aa);
  17.     }
  18.   });      
  19.  
  20. })
  21.  
  22.  
  23.     Is that the correct way to create a JSON object.. because on the server side.. I cant read deeper than driver
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement