Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Datatable use

Expand Messages
  • Satyam
    You have many of the same components repeated. I don t know precisely why, but that often causes random errors. yahoo-dom-event is the compressed version of
    Message 1 of 2 , Mar 5, 2008
    • 0 Attachment
      You have many of the same components repeated. I don't know precisely why,
      but that often causes random errors. yahoo-dom-event is the compressed
      version of the first three individual files you are loading, and then,
      utilities.js has most of the YAHOO.util.* componets, including
      yahoo-dom-events which itself ..... well, you know. Besides, you are mixing
      compressed versions with regular ones. Quite a mess. Clean up your
      dependencies and there is a good chance things will work.

      Satyam

      ----- Original Message -----
      From: "hardik_982" <hardik_982@...>
      To: <ydn-javascript@yahoogroups.com>
      Sent: Wednesday, March 05, 2008 12:46 PM
      Subject: [ydn-javascript] Datatable use


      >i am newbie to yui
      > try to use data table example
      > i have created yui.jsp to include
      > --------------------------------
      > <html>
      > <head>
      > <!-- YUI Dependencies -->
      > <script type="text/javascript" src="js/yui/yahoo.js"></script>
      > <script type="text/javascript" src="js/yui/dom.js"></script>
      > <script type="text/javascript" src="js/yui/event.js"></script>
      > <script type="text/javascript" src="js/yui/animation.js"></script>
      > <script type="text/javascript" src="js/yui/dragdrop.js"></script>
      > <script type="text/javascript" src="js/yui/connection-min.js"></script>
      > <script type="text/javascript" src="js/yui/container.js"></script>
      > <script type="text/javascript" src="js/yui/element-beta.js"></script>
      > <script type="text/javascript" src="js/yui/tabview.js"></script>
      > <script type="text/javascript" src="js/yui/button.js"></script>
      > <script type="text/javascript" src="js/yui/utilities.js"></script>
      >
      > <script type="text/javascript" src="js/yui/yahoo-dom-event.js"></script>
      > <script type="text/javascript" src="js/yui/element-beta.js"></script>
      > <script type="text/javascript" src="js/yui/datasource-beta.js"></script>
      > <script type="text/javascript" src="js/yui/datatable-beta.js"></script>
      >
      >
      > <link rel="stylesheet" type="text/css"
      > href="CSS/yui/container/container.css" />
      > <link rel="stylesheet" type="text/css"
      > href="CSS/yui/tabview/tabview.css">
      > <link rel="stylesheet" type="text/css"
      > href="CSS/yui/button/button.css">
      > <link rel="stylesheet" type="text/css" href="CSS/fonts/fonts-min.css" />
      > <link rel="stylesheet" type="text/css"
      > href="CSS/datatable/datatable.css" />
      > <!-- End YUI Dependencies -->
      > </head>
      >
      > </html>
      >
      > ---------------------------------
      >
      >
      > now when i create my jsp
      > --------------------------
      > <%@ taglib prefix="s" uri="/struts-tags" %>
      > <%@page import="java.sql.ResultSet;" %>
      > <jsp:useBean id="dml" class="dmlsql.fetchrec" scope="page"></jsp:useBean>
      > <%
      > dml.fldname="*";
      > dml.tblname="DISUPEMST.BRANCH";
      > dml.whrqry="";
      > dml.grpqry="";
      > dml.ordqry="";
      > dml.setSelqry();
      > ResultSet rsusr=dml.getRs();
      > %>
      > <s:include value="yui.jsp"></s:include>
      > <html>
      > <head>
      > <script type="text/javascript">
      > YAHOO.util.Event.addListener(window, "load", function() {
      > YAHOO.example.EnhanceFromMarkup = new function() {
      > var myColumnDefs = [
      > {key:"Code",sortable:true},
      > {key:"Branch", sortable:true}
      > ];
      >
      >
      > this.myDataSource = new
      > YAHOO.util.DataSource(YAHOO.util.Dom.get("branch"));
      > this.myDataSource.responseType =
      > YAHOO.util.DataSource.TYPE_HTMLTABLE;
      > this.myDataSource.responseSchema = {
      > fields:
      > [{key:"Code",parser:YAHOO.util.DataSource.parseNumber},
      > {key:"Branch"} ]
      > };
      >
      > this.myDataTable = new YAHOO.widget.DataTable("markup",
      > myColumnDefs, this.myDataSource,
      > {caption:"BRANCH"}
      > );
      > };
      > });
      > </script>
      > </head>
      >
      > <body class="yui-skin-sam">
      > <div id="markup">
      > <table id="branch">
      > <thead>
      > <tr>
      > <th>Code</th>
      > <th>Branch</th>
      > </tr>
      >
      > </thead>
      > <tbody>
      > <%while(rsusr.next())
      > {%>
      > <tr>
      > <td><%=rsusr.getString(1) %></td>
      > <td><%=rsusr.getString(2) %></td>
      > </tr>
      > <%} %>
      > </tbody>
      >
      > </table>
      > </div>
      >
      >
      > </body>
      > </html>
      > -------------------------
      > it gives javascript error invalid argument
      > and it also does not display any style format
      > shows heading two times also
      >
      > i dont know what is problem
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      > --
      > No virus found in this incoming message.
      > Checked by AVG Free Edition.
      > Version: 7.5.516 / Virus Database: 269.21.4/1312 - Release Date:
      > 04/03/2008 21:46
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.