0
$('#update-info').on('click',function() {

    $.ajax({
        url: '<?php echo Yii::$app->request->baseUrl . 'ajax'?>',
        //data: {name: properties.filename},
        type: "POST",
        success: function () {
            console.log("success");
        },
        error: function () {
            console.log("failure");
        }
    });
});
Insane Skull
  • 9,220
  • 9
  • 44
  • 63

1 Answers1

0

Use it as everywhere else:

$.ajax({
  method: "POST",
  url: "controller/action", // here your URL address
  data: { name: "John", location: "Boston" }
});

Modify url to match your address for ajax request.

Yupik
  • 4,932
  • 1
  • 12
  • 26