$('#retrieve_password_button').live("click", function(){
if ($('#answer').val() != "") {
$.post('authentication/questionVerification/' + $('#username_for_question').val() + '/' + $('#answer').val(), function(data){
if(data != ""){
$('#retrieved_password_box').text("Your password is : " + data).slideDown('1500');
}else {
$('#retrieved_password_box').text("Security answer incorrect").slideDown('1500');
}
});
$( "#password_retrieved_dialog" ).dialog({
resizable: false,
width:500,
draggable: false,
modal: true,
buttons: {
"Close" : function() {
$( this ).dialog( "close" );
alert('something'); /*place where I placed my code (jQuery , javascript)
}
}
});
}
})
**更新**
现在正在运作。我试过@mcgrailm说的话。但是,其他命令仍然没有工作,如
答案 0 :(得分:0)
请你再给我们一些代码。我刚刚编写了一个简单的例子:http://jsfiddle.net/nU6E7/ 它不会重定向,但也许您可以看到有关此代码和您的代码的不同之处?
此示例重定向:http://jsfiddle.net/nU6E7/1/
答案 1 :(得分:0)
试试这个
buttons: {
'Proced': function() {
$(this).dialog('close');
document.location.href = "place/to/go";
}
}