我正在尝试开发一个应用程序,用户可以在单击按钮的弹出窗口中选择日期并查看其事务历史记录,然后将调用ajax并返回然后返回pop内部。参考:http://romb.github.io/jquery-dialogextend/example.html
<script>
$(function () {
var remoteUrl = 'send.php';
var largeParams = {
param1: $("#date").val()
};
$("#button").click(function () {
var dialogBox = {
"title": "Dialog title",
"width": 640,
"height": 480,
"modal": true,
"resizable": true,
"draggable": true,
"dialogClass": "ui-dialog-red",
"open": function () {
var $message = $('<div>Loading...</div>');
$.ajax({
url: remoteUrl,
type: 'POST',
data: largeParams,
context: {
jDialongbox: dialogRef
},
success: function (content) {
this.jDialongbox.setMessage(content);
}
});
return $message;
},
"buttons": {"Close": function () {
$(this).dialog("close");
}}
};
var moreOptions = {
"closable": true,
"maximizable": true,
"minimizable": true,
"dblclick": "collapse",
"minimizeLocation": "left",
"icons": {
"close": "ui-icon-close",
"maximize": "ui-icon-arrow-4-diag",
"minimize": "ui-icon-arrowstop-1-s",
"restore": "ui-icon-carat-2-n-s"
}
};
$("#form").dialog(dialogBox).dialogExtend(moreOptions);
});
});
</script>
任何Suggesstion将不胜感激。