日期:2014-05-17 浏览次数:20629 次
ShowWarning("该数据不存在,请刷新!");
//提示框
function ShowWarning(msg, callback) {
Ext.MessageBox.show({
title: '警告',
msg: msg,
modal: true,
buttonText: {
ok: "确定"
},
fn: callback,
icon: Ext.Msg.WARNING
});
}
Ext.get('Btn_SelectData');.on('click', function () {
var url = '<%=Url.Action("对应的Action","对应的Controller")%>;
win = openWindow('获取', 800, 720, url, true);
});
//弹出页面效果也比较不错
function openWindow(title, width, height, url, automax) {
var showPanel;
var html = '<iframe src="' + url + '" width="100%" height="100%" ></iframe>';
showPanel = new Ext.Panel({
layout: 'fit',
html: html
});
var newWindow = new Ext.Window({
title: title,
width: width,
height: height,
resizable: false,
closable: true,
draggable: true,
layout: 'fit',
modal: true,
maximized: automax == undefined ? false : automax,
maximizable: automax == true ? false : true,
plain: true, // 表示为渲染window body的背景为透明的背景
bodyStyle: 'padding:5px;',
items: [showPanel]
});
newWindow.show();
return newWindow;
}