jquery confirm action doesn't work -
i'm using class set yes/no alert.
http://myclabs.github.io/jquery.confirm/
this code:
var currentid; $(".confirm").click(function() { currentid = $(this).attr('id'); }); $(".confirm").confirm({ text: "are sure?", confirm: function(button) { //if alert here currentid, alerts right $.post("receive.php", { currentid: "id"} ) .done(function(data) { alert(data); //nothing!!! }); }, cancel: function(button) { $('.modal hide fade').css("display", "none"); }, confirmbutton: "yes", cancelbutton: "no!", post: true }); });
receive.php
<? echo $_post['id']; ?>
$.post("receive.php", { currentid: "id"} )
should be
$.post("receive.php", { id: currentid } )
Comments
Post a Comment