Need help with JQuery UI Dialog function
$('#retrieve_password_button').live("click", function(){
if ($('#answer').val() != "") {
$.post('authentication/questionVerification/' + $('#username_for_qu开发者_开发知识库estion').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)
}
}
});
}
})
** UPDATE **
It's working now. I tried what @mcgrailm said. But, It other command still not working such as
Can you please give us some more code. I just made up a quick example: http://jsfiddle.net/nU6E7/ It does not redirect, but maybe you can see something different about this code and yours?
This example redirects: http://jsfiddle.net/nU6E7/1/
try like this
buttons: {
'Proced': function() {
$(this).dialog('close');
document.location.href = "place/to/go";
}
}
JSFIDDLE
精彩评论