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

Re: Need Help

Expand Messages
  • mansoor44ahmed44
    Thanks Satyam!! Mansoor ... is row , no ... that ... hardly ... scripting ... happen ... whether ... going ...
    Message 1 of 3 , Sep 28, 2008
      Thanks Satyam!!

      Mansoor


      --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
      >
      > You are specifying the resultNode as "Row" when it actually
      is "row", no
      > records will be found.
      >
      > When you have this kind of problem, please provide the actual data
      that
      > the browser actually gets, not the code on your server. You can
      hardly
      > expect everyone in this list to know all possible server-side
      scripting
      > languages, you would be restricting yourself to a few who might
      happen
      > to know that particular one. Besides, it is a good way to know
      whether
      > the problem lays, client or server side.
      >
      > Satyam
      >
      >
      > mansoor44ahmed44 wrote:
      > > Hi Folks,
      > >
      > > I am getting 'No Records Found' message when I try to create a
      > > dataable from xml source. Could some one please tell where am I
      going
      > > wrong?. Below is the java script code and php code(this code
      > > generates xml.
      > >
      > > /******************************************/
      > > /***********Java Script / HTML ************/
      > > /******************************************/
      > >
      > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
      > > Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      > >
      > > <!--CSS file (default YUI Sam Skin) -->
      > > <link type="text/css" rel="stylesheet"
      > >
      href="http://yui.yahooapis.com/2.5.2/build/datatable/assets/skins/sam/
      > > datatable.css">
      > >
      > > <!-- Dependencies -->
      > > <script type="text/javascript"
      > > src="http://yui.yahooapis.com/2.5.2/build/yahoo-dom-event/yahoo-
      dom-
      > > event.js"></script>
      > > <script type="text/javascript"
      > > src="http://yui.yahooapis.com/2.5.2/build/element/element-beta-
      > > min.js"></script>
      > > <script type="text/javascript"
      > > src="http://yui.yahooapis.com/2.5.2/build/datasource/datasource-
      beta-
      > > min.js"></script>
      > >
      > >
      > > <!-- OPTIONAL: Connection (enables XHR) -->
      > > <script type="text/javascript"
      > > src="http://yui.yahooapis.com/2.5.2/build/connection/connection-
      > > min.js"></script>
      > >
      > > <!-- OPTIONAL: Drag Drop (enables resizeable or reorderable
      columns) -
      > > ->
      > > <script type="text/javascript"
      > > src="http://yui.yahooapis.com/2.5.2/build/dragdrop/dragdrop-
      > > min.js"></script>
      > >
      > > <!-- Source files -->
      > > <script type="text/javascript"
      > > src="http://yui.yahooapis.com/2.5.2/build/datatable/datatable-
      beta-
      > > min.js"></script>
      > >
      > >
      > >
      > > <html>
      > > <head>
      > > <meta http-equiv="Content-Type" content="text/html; charset=utf-
      8">
      > > <title>Page 3</title>
      > > </head>
      > >
      > > <body>
      > >
      > > <div id="myContainer" >
      > >
      > > </div>
      > > </body>
      > > </html>
      > >
      > >
      > >
      > > <script type="text/javascript">
      > >
      > > YAHOO.util.Event.addListener(window, "load", function() {
      > >
      > > var myColumnDefs = [
      > > {key:"Software_id"},
      > > {key:"Name"} ,
      > > {key:"Owner"},
      > > {key:"Version"},
      > > {key:"Description"},
      > > {key:"no_downloads"},
      > > {key:"rating"}
      > > ];
      > >
      > >
      > > var myDataSource = new YAHOO.util.DataSource
      > > ("http://localhost/workarea/generate_xml.php?");
      > > myDataSource.responseType = YAHOO.util.DataSource.TYPE_XML;
      > >
      > > myDataSource.responseSchema = {
      > > resultNode: "Row",
      > > fields:
      > >
      ["Software_id", "Name", "Version", "Owner", "Description", "no_downlo
      > > ads", "rating"]
      > > };
      > >
      > > var myDataTableDeferred = new YAHOO.widget.DataTable
      > > ("myContainer", myColumnDefs, myDataSource,
      > > { scrollable: true,
      > > width: "40em" ,
      > > height: "50px",
      > > draggableColumns:true
      > > });
      > >
      > >
      > > });
      > >
      > >
      > > </script>
      > >
      > >
      > > /******************************************/
      > > /*************** PHP Script ***************/
      > > /******************************************/
      > >
      > > <?php require_once('Connections/myconnection.php'); ?>
      > >
      > > <?php
      > > // Query the database and get all the records from the Images
      table
      > > mysql_select_db($database_myconnection, $myconnection);
      > > $query_rsAll = "SELECT * FROM SOFTWARE_LIST";
      > > $rsAll = mysql_query($query_rsAll, $myconnection) or die
      (mysql_error
      > > ());
      > > $row_rsAll = mysql_fetch_assoc($rsAll);
      > > $totalRows_rsAll = mysql_num_rows($rsAll);
      > >
      > > // Send the headers
      > > header('Content-type: text/xml');
      > > ?><?php echo('<?xml version="1.0" encoding="utf-8"?>'); ?>
      > > <root>
      > > <?php if ($totalRows_rsAll > 0) { // Show if recordset not
      empty ?>
      > > <?php do { ?>
      > > <row>
      > > <?php foreach ($row_rsAll as $column=>$value) { ?>
      > > <<?php echo $column; ?>><![CDATA[<?php echo $row_rsAll
      > > [$column]; ?>]]></<?php echo $column; ?>>
      > > <?php } ?>
      > > </row>
      > > <?php } while ($row_rsAll = mysql_fetch_assoc($rsAll)); ?>
      > > <?php } // Show if recordset not empty ?>
      > > </root>
      > > <?php
      > > mysql_free_result($rsAll);
      > > ?>
      > >
      > >
      > >
      > > ------------------------------------
      > >
      > > Yahoo! Groups Links
      > >
      > >
      > >
      > > ------------------------------------------------------------------
      ------
      > >
      > >
      > > No virus found in this incoming message.
      > > Checked by AVG - http://www.avg.com
      > > Version: 8.0.169 / Virus Database: 270.7.3/1693 - Release Date:
      26/09/2008 7:35
      > >
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.