RJ Solusoft

We can use this code to post data in jquery.

var data = $(“selector”).val();

$.POST(‘<?php echo $this->createUrl(‘site/’); ?>’ ,data : data, function(response)’){

echo ‘<pre>’;

print_r(response);

}

We can also use the following code to post data in jquery.

$.ajax({
  type: 'POST',
  url: '<?php echo $this->createUrl(''); ?>',
  data: data,
  success: function()
             {
               print("success");
             }
});

View original post

Advertisements