UpdatePanel 重新向页面注册脚本方法

var prm = Sys.WebForms.PageRequestManager.getInstance();

prm.add_endRequest(function () {
$("td.operatetd").hover(function toggleoperate() {
$(this).find("span").fadeToggle(300);
});

var isTreeClick = document.getElementById("<%=hidNotNull.ClientID %>").value;
if (isTreeClick != "false") {
var mapTeeVal = document.getElementById("<%=hidMapTee.ClientID %>").value;
loadTreeCell(mapTeeVal);
}

$(document).progressDialog.hideDialog();
var tid = '';
var otherHeight = <%=gvDepartment.OtherHeight %>;
var _bodyheight = jQuery('body').height() - otherHeight;
$('#<%=gvDepartment.ClientID %>').chromatable({ width: '100%', height: _bodyheight + 'px', scrolling: 'yes' });
$(window).resize(function () { if (tid != '') $('#' + tid).css('height', jQuery('body').height() - otherHeight + 'px') });
});

prm.add_beginRequest(function(){
$(document).progressDialog.showDialog('数据加载中,请稍等片刻...', '/JQResource/JQTable/images/loading.gif');
});

posted @ 2013-05-31 11:17  大蘋果  阅读(145)  评论(0)    收藏  举报