这是我也没的脚本
<%@page language="java" contentType="text/html; charset=GB2312" import="com.xscx.*,java.util.*" errorPage="xt_error.jsp"%>
<html>   
<head>   
<script type="text/javascript" src="/show/ReportServer?op=resource&resource=/com/fr/web/load.js"></script>      
<Script Language="JavaScript">  
function init(PicID) {      
  var $reportPane = $("#reportPane").PagePane(); // 取出实际的PagePane对象,PagePane用全局变量  
  alert(this.element);  pagePane = $reportPane.data("PagePane");// james:get object of the pagepane      
  pagePane.load("/show/ReportServer?reportlet=/com/scbb/"+PicID+".cpt");      
}
</Script>   
</head>   
<body onload="javascript:init('yyjmsjzy')">
<div id="reportPane" style="position:absolute;left:0px;top:0px; width:850px;height:600px;border-width:0">
<table border="0" width="844" height="30" cellspacing="0" cellpadding="0">
  <tr>
    <td background="IMG/right_extend.jpg"><font color="#707070" face="宋体" style="font-size:12px;">&nbsp; 你现在的位置:&gt;&gt;集团内网 &gt;&gt; 应用查询数据</font>
    </td>
  </tr>
</table>
</div>
</body>   
</html>  
 报错现象;我用浏览器打开的时候,出现下面的页面脚本错误
Line:1
Char:190673
 Code:0
Error:'this.element' 为空或不是对象
网址:http://localhost:8080/show/ReportServer?op=resource&resource=/com/fr/web/load.js

解决方案 »

  1.   

    你是不是用了jquery?  而忘记导入jquery所必须的包了
      

  2.   

    to ticmy   
      上述用到的相关$是因为使用了一个软件finereport里的东西,所以才用的这玩意,说实话,我也不太清楚为何要用这个东西。
    该软件使用自定义的DIV嵌入   才用到的
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">   
    <html>   
     <head>   
      <title>FineReport Demo</title>   
        <link rel="stylesheet" type="text/css" href="/WebReport/ReportServer?op=resource&resource=/com/fr/web/core/css/page.css"/>   
        <link rel="stylesheet" type="text/css" href="/WebReport/ReportServer?op=resource&resource=/com/fr/web/load.css"/>   
        <script type="text/javascript" src="/WebReport/ReportServer?op=resource&resource=/com/fr/web/jquery.js"></script>   
        <script type="text/javascript" src="/WebReport/ReportServer?op=emb&resource=finereport.js"></script>   
        <script type="text/javascript">    
            $(function() {   
                var $reportPane = $("#reportPane").PagePane();         
                // 取出实际的PagePane对象,PagePane用全局变量         
                pagePane = $reportPane.data("PagePane");       
                pagePane.load("/WebReport/ReportServer?reportlet=/gettingstarted.cpt&country=China");      
            })   
        </script>   
              
     </head>   
     <body>   
     <div id="reportPane" style="width:100%;height:100%"></div> <!--报表div-->   
     </body>     
    </html>  
      

  3.   

      to  cuiqunhao是不是用了jquery?我也不知道,我就是按刚才回复的来用的。
      

  4.   

    to cuiqunhao
       我在<script type="text/javascript" src="/show/ReportServer?op=resource&resource=/com/fr/web/load.js"></script> 
    位置后,也将jquery。js给加进去了。可是还是出现那个问题。很是讨厌啊!请大侠给菜鸟指点一下!