Loading

jQuery UI confirmation dialog and asp.net postback

$(document).ready(function(){

$(
"#dialog").dialog({
modal:
true,
bgiframe:
true,
width:
500,
height:
200,
autoOpen:
false
});


$(
".lb").click(function(e) {
e.preventDefault();
var theHREF = $(this).attr("href");


$(
"#dialog").dialog('option', 'buttons', {
"Confirm" : function() {
window.location.href
= theHREF;
},
"Cancel" : function() {
$(
this).dialog("close");
}
});

$(
"#dialog").dialog("open");

});
});
link:

jQuery UI confirmation dialog and asp.net postback

 

http://www.deviantpoint.com/post/2009/03/12/Using-jQuery-UI-Dialogs-for-confirmation-windows.aspx

posted @ 2011-02-17 17:09  .net's  阅读(556)  评论(0)    收藏  举报