易截截图软件、单文件、免安装、纯绿色、仅160KB

ReportViewer JavaScript API


JavaScript API
One of the new features we added to the ASP.Net Report Viewer in Visual Studio 2010 is a JavaScript API to allow you to interact with the viewer on client.  In reading many of the posts on the report controls forum, we found that many people struggle when implementing a custom toolbar or replacing portions of the toolbar functionality.  The new JavaScript API is intended to make it easier for you to provide the same functionality available through the built-in toolbar with a minimum amount of effort.
The JavaScript API is exposed through the client side ReportViewer object.  Specifically, it’s the Microsoft.Reporting.WebFormsClient.ReportViewer class.  An instance of this class is created on the client for each instance of the ReportViewer control on the page.
Referencing the client side viewer
The ReportViewer client side object inherits from Sys.UI.Control.  To obtain a reference to the client side viewer, use the $find method as follows:
    var clientViewer = $find("ReportViewer1");
The identifier you pass to $find corresponds to the ClientID of the ReportViewer server control.
Checking the state of the viewer
Once you have a reference to the client side viewer, you will want to check the state of the viewer before invoking most of the various methods and properties it exposes.  When the viewer is in a loading state, most of the functionality of the client viewer is unavailable and will throw an exception if called.  The viewer is loading whenever an asynchronous postback is in progress.  It is also in the loading state while retrieving a report page.  This usually happens during an asynchronous postback, but can also extend beyond the lifetime of the postback, such as while retrieving images displayed on the report page.  To check the state of the viewer, use the isLoading property:
    var isLoading = clientViewer.get_isLoading();
Once you have dete


相关文档:

JavaScript 获取对象的高度和宽度详细说明

scrollHeight: 获取对象的滚动高度。
scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离
scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离
scrollWidth:获取对象的滚动宽度
offsetHeight:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度
offsetL ......

javascript调用java代码,el表达式

我们在jsp页面上的js脚本中可以调研java代码,比如,我们需要再js中用alert函数显示服务器端发送过来的某个字符串那么我们可以这样做
tomcat下:
在服务器端我们有request.setAttribute("name","abc");
那么我要在页面上用alert显示的话,有两种方式:
1、使用EL表达式
  在El表达式的外面用引号即可:
<scri ......

JavaScript使用技巧精萃

(一).确认删除用法:
  1. BtnDel.Attributes.Add("onclick","return confirm('"+"确认删除?"+"')");
  2. linktempDelete.Attributes["onclick"]="javascript:return  confirm('"+"确认删除?"+"');";
  3. privat ......

利用JavaScript实现上传图片预览

<script >
function showimage()

       //IMG1为图片控件或Div,File1为上传文件控件
document.getElementById("IMG1"). src = document.getElementById("File1").value;
}
</script >
控件中引用:
<input id="File1" runat="server" type="file"  onc ......

javascript动态添加/删除div


添加
<script>
var oDiv = document.createElement("DIV");
oDiv.id = "shop01";
oDiv.style.top = 200;
oDiv.style.left = 200;
oDiv.style.background = '#FFFF00';
oDiv.style.visibility = 'visible';
oDiv.innerHTML="123123"
document.body.appendChild(oDiv ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号