我有下一个按钮,通过单击此按钮,我必须在同一个对话框中打开下一个客户数据,但我没有关闭 jquery 中的旧对话框。我怎样才能?
$("#GetCustomerId").click(function GetCustomerData(custno,arrow,indexno){
var loc = window.location;
var pathName = loc.pathname.substring(0, loc.pathname.lastIndexOf('/') + 1);
$("#dialog-Customer",parent.document).dialog({
autoOpen: false,
height:720,
width: 1200,
modal: true,
open: function (event, ui) {
$('#dialog-Customer').css('overflow', 'hidden');
$(event.target).parent().css('position', 'absolute');
$(event.target).parent().css('top', '0px');
$(event.target).parent().css('left', '85px');
}
});
$.ajax({
type: "POST",
url: pathName+"GetNextCustomerData.do",
data:{indexno:indexno,custno:custno,arrow:arrow},
beforeSend:function(){
$('#dialog-Customer',parent.document).html('<div class="loading"><img src="images/loading_big.gif" alt="Loading..." /></div>');
},
success: function(response){
$('#dialog-Customer',parent.document).html(response);
},
error: function(e){
alert('Error: ' + e);
}
});
$("#dialog-Customer",parent.document).dialog("open");
});