Reputation: 171
$('.delVid, .delUpdate, .delComment').click(function(){ //check deletions
$.prompt('delete this entry?',{ buttons: { Ok: true, Cancel: false }, focus: 1 });
return false;
});
The classes are describing hyperlinks that when clicked delete an entry from MySQL.
I was using a vanilla confirm box before and having success, but I don't understand how to return a "true" or "false" from the impromptu box.
I think I have to use some kind of callback function, but I have been having no success =/
Upvotes: 1
Views: 2807
Reputation: 682
If you check out this link:
http://trentrichardson.com/Impromptu/index.php
It shows you on the RH column about 50% way down your answer. Here it is anyway:
Add a callback function:
function mycallbackfunc(v,m,f){
$.prompt('i clicked ' + v);
}
$.prompt('Example 8',{ callback: mycallbackfunc });
The callback function has three parameters.
Upvotes: 2