I am trying to put this ajax call - to send send message to an SMS gateway.
I would like to place this code on Edit Page, so when "Save" button is pressed, it will run this code, but I dont know where to place this code.. any help is appreciated.
____
var model = {
"PhoneNo": "xxxxxxxxxxx",
"SMSMessage": "Write your Message"
}
$.ajax({
url: " http://sms.xxxxxxxx.com/api/cmpservice.svc/smssend/VCFD/MQ==/en ",
type: 'POST',
dataType: "json",
data: JSON.stringify(model),
contentType: "application/json; charset=utf-8",
success: function (data) {
alert('send')
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
console.log(XMLHttpRequest);
}
});