点击链接后会弹出一个确认框。单击确定时我需要它来启动一个功能
目前这是我的代码:
JQUERY
jQuery(document).ready(function(){
// confirm box
if(jQuery('.confirmbutton').length > 0) {
jQuery('.confirmbutton').click(function(){
jConfirm('You are about to delete your Profile Photo.'
, 'Delete Profile Photo', function(r) {
if (r == true) {
$.get('core/functions/queryUpdates.cfc?method=delProfilePhoto&userID=#SESSION.User.ID#'),
jAlert('Your Profile Photo is now deleted.', 'Thank You');
}
else {
$(this).dialog("close");
}
});
});
}
});
COLDFUSION
<cffunction name="delProfilePhoto" access="remote" returntype="string">
<cfargument name="userID" type="string" required="yes">
<cfmail to="email" from="email" subject="foo">
bar
</cfmail>
</cffunction>
使用我当前的代码,该函数不会触发,也不会收到jAlert。我做错了什么?
谢谢!