$(document).ready(function () {
///////////
var model = { OrganizationName: "XYZ limited",OrganizationLocation: "Islamabad",OrganizationCode: 121 }
$.ajax({
type: "POST",
url: "/umbraco/api/Email/Create",
data: model,
success: function() {
},
error: function(xhr) {
}
});
//////////////////
$("#save").on('click', function (e) {
debugger;
var subject = $("#subject").val();
var message = $("#message").val();
var id = @Model.Content.Id;
$.ajax({
url: "/umbraco/surface/BlogPostMessage/PostComments",
type:"Get",
dataType: "json",
data: { 'name': name, 'subject': subject, 'message': message, 'id':id },
cache: false,
contentType: "application/json; charset=utf-8",
success: function (result) {
debugger;
if (result.success) {
alert(result.message);
}
alert(result.message);
window.location.reload();
},
failure: function(result) {
debugger;
alert(result.message);
window.location.reload();
}
});
});
});
</script>
No comments:
Post a Comment