4 months ago

How can i save comment_id in LIKE table without displaying it on code?

Posted 4 months ago by raviawasti

I am using ajax method:-

$(document).ready(function() {

$('.store_comment_like').on('click',function(e) {

var comment_id = $(this).attr('data-comment-id');

var data = {comment_id:comment_id};

var request = $.ajax({

    url: "/post/store_comment_like",

    type: "POST",

    data: data,

     success: function ()

printErrorMsg(data.success); },

}else{ printErrorMsg(data.error); } }); });

i dont want to show data-comment-id in my from but i want to save it also

Please sign in or create an account to participate in this conversation.