I have attached to some of my links a simple javascript confirmation function
function cancelAction() { return confirm( "are you sure etc etc"); }
that works as intended with regular links, but once ajaxified, the result is ignored and the new page always loaded.