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

Re: [ydn-javascript] Continuous Update of DataTable

Expand Messages
  • nihar bhatt
    Finally I Solved the problem of Permission Denial but now a new problem arises Now i am getting No Records Found error in the data table. When i am trying
    Message 1 of 17 , Jan 2, 2008
    • 0 Attachment
      Finally I Solved the problem of "Permission Denial" but now a new problem arises

      Now i am getting "No Records Found" error in the data table.

      When i am trying to track the oParsedResponse in doBeforeCallback using alert function
      and even in FireBug i am getting proper result, but in data table it is showing me "No Records Found".

      So please do post the solution

      ntimesc



      On Jan 2, 2008 9:20 PM, Satyam < satyam@...> wrote:

      Are you requesting the data from the same host that you are requesting the page?  It is called 'same origin policy', you can search for that, it's even in Wikipedia.
       
      Satyam
       
      ----- Original Message -----
      Sent: Wednesday, January 02, 2008 11:09 AM
      Subject: Re: [ydn-javascript] Continuous Update of DataTable

      after installing FireBug i found that Mozila Firefox is giving me following error
      while accessing my servlet which is deployed on a local serve

      'Permission denied to call method XMLHttpRequest.open' when calling method'

      so please do post the solution

      Thanking You
      ntimesc


      On Dec 30, 2007 2:40 PM, Satyam < satyam@...> wrote:

      Not having access to your 'localhost' I wouldn't know.  Debugging is the only alternative.  Do you have Firefox with the Firebug add-on installed? It is the best combination for this kind of environment. That will tell you what's going on.  If you don't have experience with it, this is a good time to start.
       
      Satyam
      ----- Original Message -----
      Sent: Sunday, December 30, 2007 7:44 AM
      Subject: Re: [ydn-javascript] Continuous Update of DataTable

      When trying the same ..... i am getting "Loading Data..." inside my table
      and then nothing gonna happened .....
      So could you help me why it is showing me this

      On Dec 30, 2007 1:57 AM, Satyam < satyam@...> wrote:

      You probably have an error response in oResponse (a property called error set to true) and no results property so when trying to check for oResponse.results.length you are getting an execution error. since results is undefined and doesn't have any length property.   Check your URL or the format of the response.  You can also listen to DataSource's dataErrorEvent.
       
       
      Satyam
      ----- Original Message -----
      Sent: Saturday, December 29, 2007 7:04 PM
      Subject: Re: [ydn-javascript] Continuous Update of DataTable

      Hi,
      After creating myDataTable when I am writing following code which is described in one of the examples of YUI


      var num=myDataSource.sendRequest(" http://localhost:8080/beerv1/Data.do?item=infy"
                                  ,
                                  function(oRequest,oResponse) {

                                      alert("There are " + oResponse.results.length + "Data Item");
                                  },
                                  this


                              );


      I am not getting the alert box displaying length of data. So once i cleared with this then i will go for setInterval.

      but for do you have any idea why this code is not working....


      On Dec 29, 2007 11:04 PM, Satyam <satyam@...> wrote:

      Once you have built the DataTable, keep the reference to the DataSource, lets call it myDataSource, and you can do:
       
      myDataSource.setInterval(3000, myDataTable.get('initialRequest'),myDataTable.onDataReturnInitializeTable,myDataTable);
       
      I'm assuming that for each refresh you will repeat the same GET url arguments as for the first one, which might not be the case.  The string with the url-encoded arguments goes into the second argument to setInterval.  I'm reading the same used for the initial request, but you may change them to whatever your server might expect, though they can't be changed for each individual refresh.  If you need to change them, use method sendRequest (it uses the same arguments but the first) and with window.setInterval providing the timing so you have control over the argument in between refreshes.
       
      See:
       
      Satyam
       
       
       
      ----- Original Message -----
      Sent: Saturday, December 29, 2007 5:37 PM
      Subject: [ydn-javascript] Continuous Update of DataTable

      Hi,

      I want my data table to be filled with data which is sent by my remote server but i want to poll the server after every 3 seconds.

      So eventually i want my data table would poll the server after 3 seconds and update itself continuously.

      My server is returning the data in a string format with ,(Comma) separated fields.

      So please do post some code or guideline

      Any Help would be appreciable

      Thanking You
      ntimesc


      No virus found in this incoming message.
      Checked by AVG Free Edition.
      Version: 7.5.516 / Virus Database: 269.17.11/1201 - Release Date: 28/12/2007 11:51


      No virus found in this incoming message.
      Checked by AVG Free Edition.
      Version: 7.5.516 / Virus Database: 269.17.11/1201 - Release Date: 28/12/2007 11:51


      No virus found in this incoming message.
      Checked by AVG Free Edition.
      Version: 7.5.516 / Virus Database: 269.17.12/1202 - Release Date: 29/12/2007 13:27


      No virus found in this incoming message.
      Checked by AVG Free Edition.
      Version: 7.5.516 / Virus Database: 269.17.13/1206 - Release Date: 01/01/2008 12:09

    • Satyam
      No one can post a solution because nobody knows what your problem might be. What you are doing is nothing exceptional, it shouldn t be hard. So, unless you
      Message 2 of 17 , Jan 2, 2008
      • 0 Attachment
        No one can post a solution because nobody knows what your problem might be.  What you are doing is nothing exceptional, it shouldn't be hard.  So, unless you place it in a public place for people to see, there isn't much anyone can say.
         
        Satyam
         
         
        ----- Original Message -----
        Sent: Wednesday, January 02, 2008 6:46 PM
        Subject: Re: [ydn-javascript] Continuous Update of DataTable

        Finally I Solved the problem of "Permission Denial" but now a new problem arises

        Now i am getting "No Records Found" error in the data table.

        When i am trying to track the oParsedResponse in doBeforeCallback using alert function
        and even in FireBug i am getting proper result, but in data table it is showing me "No Records Found".

        So please do post the solution

        ntimesc



        On Jan 2, 2008 9:20 PM, Satyam < satyam@...> wrote:

        Are you requesting the data from the same host that you are requesting the page?  It is called 'same origin policy', you can search for that, it's even in Wikipedia.
         
        Satyam
         
        ----- Original Message -----
        Sent: Wednesday, January 02, 2008 11:09 AM
        Subject: Re: [ydn-javascript] Continuous Update of DataTable

        after installing FireBug i found that Mozila Firefox is giving me following error
        while accessing my servlet which is deployed on a local serve

        'Permission denied to call method XMLHttpRequest.open' when calling method'

        so please do post the solution

        Thanking You
        ntimesc


        On Dec 30, 2007 2:40 PM, Satyam < satyam@...> wrote:

        Not having access to your 'localhost' I wouldn't know.  Debugging is the only alternative.  Do you have Firefox with the Firebug add-on installed? It is the best combination for this kind of environment. That will tell you what's going on.  If you don't have experience with it, this is a good time to start.
         
        Satyam
        ----- Original Message -----
        Sent: Sunday, December 30, 2007 7:44 AM
        Subject: Re: [ydn-javascript] Continuous Update of DataTable

        When trying the same ..... i am getting "Loading Data..." inside my table
        and then nothing gonna happened .....
        So could you help me why it is showing me this

        On Dec 30, 2007 1:57 AM, Satyam < satyam@...> wrote:

        You probably have an error response in oResponse (a property called error set to true) and no results property so when trying to check for oResponse.results.length you are getting an execution error. since results is undefined and doesn't have any length property.   Check your URL or the format of the response.  You can also listen to DataSource's dataErrorEvent.
         
         
        Satyam
        ----- Original Message -----
        Sent: Saturday, December 29, 2007 7:04 PM
        Subject: Re: [ydn-javascript] Continuous Update of DataTable

        Hi,
        After creating myDataTable when I am writing following code which is described in one of the examples of YUI


        var num=myDataSource.sendRequest(" http://localhost:8080/beerv1/Data.do?item=infy"
                                    ,
                                    function(oRequest,oResponse) {

                                        alert("There are " + oResponse.results.length + "Data Item");
                                    },
                                    this


                                );


        I am not getting the alert box displaying length of data. So once i cleared with this then i will go for setInterval.

        but for do you have any idea why this code is not working....


        On Dec 29, 2007 11:04 PM, Satyam <satyam@...> wrote:

        Once you have built the DataTable, keep the reference to the DataSource, lets call it myDataSource, and you can do:
         
        myDataSource.setInterval(3000, myDataTable.get('initialRequest'),myDataTable.onDataReturnInitializeTable,myDataTable);
         
        I'm assuming that for each refresh you will repeat the same GET url arguments as for the first one, which might not be the case.  The string with the url-encoded arguments goes into the second argument to setInterval.  I'm reading the same used for the initial request, but you may change them to whatever your server might expect, though they can't be changed for each individual refresh.  If you need to change them, use method sendRequest (it uses the same arguments but the first) and with window.setInterval providing the timing so you have control over the argument in between refreshes.
         
        See:
         
        Satyam
         
         
         
        ----- Original Message -----
        Sent: Saturday, December 29, 2007 5:37 PM
        Subject: [ydn-javascript] Continuous Update of DataTable

        Hi,

        I want my data table to be filled with data which is sent by my remote server but i want to poll the server after every 3 seconds.

        So eventually i want my data table would poll the server after 3 seconds and update itself continuously.

        My server is returning the data in a string format with ,(Comma) separated fields.

        So please do post some code or guideline

        Any Help would be appreciable

        Thanking You
        ntimesc


        No virus found in this incoming message.
        Checked by AVG Free Edition.
        Version: 7.5.516 / Virus Database: 269.17.11/1201 - Release Date: 28/12/2007 11:51


        No virus found in this incoming message.
        Checked by AVG Free Edition.
        Version: 7.5.516 / Virus Database: 269.17.11/1201 - Release Date: 28/12/2007 11:51


        No virus found in this incoming message.
        Checked by AVG Free Edition.
        Version: 7.5.516 / Virus Database: 269.17.12/1202 - Release Date: 29/12/2007 13:27


        No virus found in this incoming message.
        Checked by AVG Free Edition.
        Version: 7.5.516 / Virus Database: 269.17.13/1206 - Release Date: 01/01/2008 12:09


        No virus found in this incoming message.
        Checked by AVG Free Edition.
        Version: 7.5.516 / Virus Database: 269.17.13/1206 - Release Date: 01/01/2008 12:09
      • nihar bhatt
        ok dear agreed .... here is the simple source
        Message 3 of 17 , Jan 2, 2008
        • 0 Attachment
          ok dear agreed ....

          here is the simple source
           



          On Jan 3, 2008 1:56 AM, Satyam <satyam@...> wrote:

          No one can post a solution because nobody knows what your problem might be.  What you are doing is nothing exceptional, it shouldn't be hard.  So, unless you place it in a public place for people to see, there isn't much anyone can say.
           
          Satyam
           
           
          ----- Original Message -----
          Sent: Wednesday, January 02, 2008 6:46 PM
          Subject: Re: [ydn-javascript] Continuous Update of DataTable

          Finally I Solved the problem of "Permission Denial" but now a new problem arises

          Now i am getting "No Records Found" error in the data table.

          When i am trying to track the oParsedResponse in doBeforeCallback using alert function
          and even in FireBug i am getting proper result, but in data table it is showing me "No Records Found".

          So please do post the solution

          ntimesc



          On Jan 2, 2008 9:20 PM, Satyam < satyam@...> wrote:

          Are you requesting the data from the same host that you are requesting the page?  It is called 'same origin policy', you can search for that, it's even in Wikipedia.
           
          Satyam
           
          ----- Original Message -----
          Sent: Wednesday, January 02, 2008 11:09 AM
          Subject: Re: [ydn-javascript] Continuous Update of DataTable

          after installing FireBug i found that Mozila Firefox is giving me following error
          while accessing my servlet which is deployed on a local serve

          'Permission denied to call method XMLHttpRequest.open' when calling method'

          so please do post the solution

          Thanking You
          ntimesc


          On Dec 30, 2007 2:40 PM, Satyam < satyam@...> wrote:

          Not having access to your 'localhost' I wouldn't know.  Debugging is the only alternative.  Do you have Firefox with the Firebug add-on installed? It is the best combination for this kind of environment. That will tell you what's going on.  If you don't have experience with it, this is a good time to start.
           
          Satyam
          ----- Original Message -----
          Sent: Sunday, December 30, 2007 7:44 AM
          Subject: Re: [ydn-javascript] Continuous Update of DataTable

          When trying the same ..... i am getting "Loading Data..." inside my table
          and then nothing gonna happened .....
          So could you help me why it is showing me this

          On Dec 30, 2007 1:57 AM, Satyam < satyam@...> wrote:

          You probably have an error response in oResponse (a property called error set to true) and no results property so when trying to check for oResponse.results.length you are getting an execution error. since results is undefined and doesn't have any length property.   Check your URL or the format of the response.  You can also listen to DataSource's dataErrorEvent.
           
           
          Satyam
          ----- Original Message -----
          Sent: Saturday, December 29, 2007 7:04 PM
          Subject: Re: [ydn-javascript] Continuous Update of DataTable

          Hi,
          After creating myDataTable when I am writing following code which is described in one of the examples of YUI


          var num=myDataSource.sendRequest(" http://localhost:8080/beerv1/Data.do?item=infy"
                                      ,
                                      function(oRequest,oResponse) {

                                          alert("There are " + oResponse.results.length + "Data Item");
                                      },
                                      this


                                  );


          I am not getting the alert box displaying length of data. So once i cleared with this then i will go for setInterval.

          but for do you have any idea why this code is not working....


          On Dec 29, 2007 11:04 PM, Satyam <satyam@...> wrote:

          Once you have built the DataTable, keep the reference to the DataSource, lets call it myDataSource, and you can do:
           
          myDataSource.setInterval(3000, myDataTable.get('initialRequest'),myDataTable.onDataReturnInitializeTable,myDataTable);
           
          I'm assuming that for each refresh you will repeat the same GET url arguments as for the first one, which might not be the case.  The string with the url-encoded arguments goes into the second argument to setInterval.  I'm reading the same used for the initial request, but you may change them to whatever your server might expect, though they can't be changed for each individual refresh.  If you need to change them, use method sendRequest (it uses the same arguments but the first) and with window.setInterval providing the timing so you have control over the argument in between refreshes.
           
          See:
           
          Satyam
           
           
           
          ----- Original Message -----
          Sent: Saturday, December 29, 2007 5:37 PM
          Subject: [ydn-javascript] Continuous Update of DataTable

          Hi,

          I want my data table to be filled with data which is sent by my remote server but i want to poll the server after every 3 seconds.

          So eventually i want my data table would poll the server after 3 seconds and update itself continuously.

          My server is returning the data in a string format with ,(Comma) separated fields.

          So please do post some code or guideline

          Any Help would be appreciable

          Thanking You
          ntimesc


          No virus found in this incoming message.
          Checked by AVG Free Edition.
          Version: 7.5.516 / Virus Database: 269.17.11/1201 - Release Date: 28/12/2007 11:51


          No virus found in this incoming message.
          Checked by AVG Free Edition.
          Version: 7.5.516 / Virus Database: 269.17.11/1201 - Release Date: 28/12/2007 11:51


          No virus found in this incoming message.
          Checked by AVG Free Edition.
          Version: 7.5.516 / Virus Database: 269.17.12/1202 - Release Date: 29/12/2007 13:27


          No virus found in this incoming message.
          Checked by AVG Free Edition.
          Version: 7.5.516 / Virus Database: 269.17.13/1206 - Release Date: 01/01/2008 12:09


          No virus found in this incoming message.
          Checked by AVG Free Edition.
          Version: 7.5.516 / Virus Database: 269.17.13/1206 - Release Date: 01/01/2008 12:09

        • nihar bhatt
          Ok Dear I agreed :) .... i have no problem to post the code in public so here it is YAHOO.util.Event.addListener(window,
          Message 4 of 17 , Jan 2, 2008
          • 0 Attachment
            Ok Dear I agreed   :) .... i have no problem to post the code in public
            so here it is

            <script type="text/javascript">
            YAHOO.util.Event.addListener(window, "load", function() {
                YAHOO.example.SData = new function() {
                    var myColumnDefs = [
                        {key:"CompanyName"},
                        {key:"TName"},
                        {key:"Open"},
                        {key:"High"},
                        {key:"Low"},
                        {key:"Change"},
                        {key:"Mics"},
                        {key:"Volume"}

                    ];

                    this.myDataSource = new YAHOO.util.DataSource ("http://localhost:8080/beerv1/DataStock.do?");

                    this.myDataSource.responseType = YAHOO.util.DataSource.TYPE_TEXT;
                    this.myDataSource.responseSchema = {
                    recordDelim: "\n",
                    fieldDelim: ",",

                        fields: ["CompanyName","TName","Open","High","Low","Change","Mics","Volume"]
                    };


                   this.myDataTable = new YAHOO.widget.DataTable("sdata",myColumnDefs, this.myDataSource, {caption:"DataTable Caption", initialRequest:'stock=infy'});

                  
                };
            });
            </script>

            my servlet is returning a reponse in a following string format

            INFY,INFY INC.,33.2,22.3,11.3,0.33%,34543

            Above response is visible in FireBug and even in oParsedResponse of doBeforeCallback function....


            ntimesc


            On Jan 3, 2008 1:56 AM, Satyam <satyam@...> wrote:

            No one can post a solution because nobody knows what your problem might be.  What you are doing is nothing exceptional, it shouldn't be hard.  So, unless you place it in a public place for people to see, there isn't much anyone can say.
             
            Satyam
             
             
            ----- Original Message -----
            Sent: Wednesday, January 02, 2008 6:46 PM
            Subject: Re: [ydn-javascript] Continuous Update of DataTable

            Finally I Solved the problem of "Permission Denial" but now a new problem arises

            Now i am getting "No Records Found" error in the data table.

            When i am trying to track the oParsedResponse in doBeforeCallback using alert function
            and even in FireBug i am getting proper result, but in data table it is showing me "No Records Found".

            So please do post the solution

            ntimesc



            On Jan 2, 2008 9:20 PM, Satyam < satyam@...> wrote:

            Are you requesting the data from the same host that you are requesting the page?  It is called 'same origin policy', you can search for that, it's even in Wikipedia.
             
            Satyam
             
            ----- Original Message -----
            Sent: Wednesday, January 02, 2008 11:09 AM
            Subject: Re: [ydn-javascript] Continuous Update of DataTable

            after installing FireBug i found that Mozila Firefox is giving me following error
            while accessing my servlet which is deployed on a local serve

            'Permission denied to call method XMLHttpRequest.open' when calling method'

            so please do post the solution

            Thanking You
            ntimesc


            On Dec 30, 2007 2:40 PM, Satyam < satyam@...> wrote:

            Not having access to your 'localhost' I wouldn't know.  Debugging is the only alternative.  Do you have Firefox with the Firebug add-on installed? It is the best combination for this kind of environment. That will tell you what's going on.  If you don't have experience with it, this is a good time to start.
             
            Satyam
            ----- Original Message -----
            Sent: Sunday, December 30, 2007 7:44 AM
            Subject: Re: [ydn-javascript] Continuous Update of DataTable

            When trying the same ..... i am getting "Loading Data..." inside my table
            and then nothing gonna happened .....
            So could you help me why it is showing me this

            On Dec 30, 2007 1:57 AM, Satyam < satyam@...> wrote:

            You probably have an error response in oResponse (a property called error set to true) and no results property so when trying to check for oResponse.results.length you are getting an execution error. since results is undefined and doesn't have any length property.   Check your URL or the format of the response.  You can also listen to DataSource's dataErrorEvent.
             
             
            Satyam
            ----- Original Message -----
            Sent: Saturday, December 29, 2007 7:04 PM
            Subject: Re: [ydn-javascript] Continuous Update of DataTable

            Hi,
            After creating myDataTable when I am writing following code which is described in one of the examples of YUI


            var num=myDataSource.sendRequest(" http://localhost:8080/beerv1/Data.do?item=infy"
                                        ,
                                        function(oRequest,oResponse) {

                                            alert("There are " + oResponse.results.length + "Data Item");
                                        },
                                        this


                                    );


            I am not getting the alert box displaying length of data. So once i cleared with this then i will go for setInterval.

            but for do you have any idea why this code is not working....


            On Dec 29, 2007 11:04 PM, Satyam <satyam@...> wrote:

            Once you have built the DataTable, keep the reference to the DataSource, lets call it myDataSource, and you can do:
             
            myDataSource.setInterval(3000, myDataTable.get('initialRequest'),myDataTable.onDataReturnInitializeTable,myDataTable);
             
            I'm assuming that for each refresh you will repeat the same GET url arguments as for the first one, which might not be the case.  The string with the url-encoded arguments goes into the second argument to setInterval.  I'm reading the same used for the initial request, but you may change them to whatever your server might expect, though they can't be changed for each individual refresh.  If you need to change them, use method sendRequest (it uses the same arguments but the first) and with window.setInterval providing the timing so you have control over the argument in between refreshes.
             
            See:
             
            Satyam
             
             
             
            ----- Original Message -----
            Sent: Saturday, December 29, 2007 5:37 PM
            Subject: [ydn-javascript] Continuous Update of DataTable

            Hi,

            I want my data table to be filled with data which is sent by my remote server but i want to poll the server after every 3 seconds.

            So eventually i want my data table would poll the server after 3 seconds and update itself continuously.

            My server is returning the data in a string format with ,(Comma) separated fields.

            So please do post some code or guideline

            Any Help would be appreciable

            Thanking You
            ntimesc


            No virus found in this incoming message.
            Checked by AVG Free Edition.
            Version: 7.5.516 / Virus Database: 269.17.11/1201 - Release Date: 28/12/2007 11:51


            No virus found in this incoming message.
            Checked by AVG Free Edition.
            Version: 7.5.516 / Virus Database: 269.17.11/1201 - Release Date: 28/12/2007 11:51


            No virus found in this incoming message.
            Checked by AVG Free Edition.
            Version: 7.5.516 / Virus Database: 269.17.12/1202 - Release Date: 29/12/2007 13:27


            No virus found in this incoming message.
            Checked by AVG Free Edition.
            Version: 7.5.516 / Virus Database: 269.17.13/1206 - Release Date: 01/01/2008 12:09


            No virus found in this incoming message.
            Checked by AVG Free Edition.
            Version: 7.5.516 / Virus Database: 269.17.13/1206 - Release Date: 01/01/2008 12:09

          • Satyam
            There are 8 fields declared and only 7 available, field Mics seems to be missing. ... From: nihar bhatt To: ydn-javascript@yahoogroups.com Sent: Thursday,
            Message 5 of 17 , Jan 3, 2008
            • 0 Attachment
              There are 8 fields declared and only 7 available, field "Mics" seems to be missing.
              ----- Original Message -----
              Sent: Thursday, January 03, 2008 4:32 AM
              Subject: Re: [ydn-javascript] Continuous Update of DataTable

              Ok Dear I agreed   :) .... i have no problem to post the code in public
              so here it is

              <script type="text/javascript">
              YAHOO.util.Event.addListener(window, "load", function() {
                  YAHOO.example.SData = new function() {
                      var myColumnDefs = [
                          {key:"CompanyName"},
                          {key:"TName"},
                          {key:"Open"},
                          {key:"High"},
                          {key:"Low"},
                          {key:"Change"},
                          {key:"Mics"},
                          {key:"Volume"}

                      ];

                      this.myDataSource = new YAHOO.util.DataSource ("http://localhost:8080/beerv1/DataStock.do?");

                      this.myDataSource.responseType = YAHOO.util.DataSource.TYPE_TEXT;
                      this.myDataSource.responseSchema = {
                      recordDelim: "\n",
                      fieldDelim: ",",

                          fields: ["CompanyName","TName","Open","High","Low","Change","Mics","Volume"]
                      };


                     this.myDataTable = new YAHOO.widget.DataTable("sdata",myColumnDefs, this.myDataSource, {caption:"DataTable Caption", initialRequest:'stock=infy'});

                    
                  };
              });
              </script>

              my servlet is returning a reponse in a following string format

              INFY,INFY INC.,33.2,22.3,11.3,0.33%,34543

              Above response is visible in FireBug and even in oParsedResponse of doBeforeCallback function....


              ntimesc


              On Jan 3, 2008 1:56 AM, Satyam <satyam@...> wrote:

              No one can post a solution because nobody knows what your problem might be.  What you are doing is nothing exceptional, it shouldn't be hard.  So, unless you place it in a public place for people to see, there isn't much anyone can say.
               
              Satyam
               
               
              ----- Original Message -----
              Sent: Wednesday, January 02, 2008 6:46 PM
              Subject: Re: [ydn-javascript] Continuous Update of DataTable

              Finally I Solved the problem of "Permission Denial" but now a new problem arises

              Now i am getting "No Records Found" error in the data table.

              When i am trying to track the oParsedResponse in doBeforeCallback using alert function
              and even in FireBug i am getting proper result, but in data table it is showing me "No Records Found".

              So please do post the solution

              ntimesc



              On Jan 2, 2008 9:20 PM, Satyam < satyam@...> wrote:

              Are you requesting the data from the same host that you are requesting the page?  It is called 'same origin policy', you can search for that, it's even in Wikipedia.
               
              Satyam
               
              ----- Original Message -----
              Sent: Wednesday, January 02, 2008 11:09 AM
              Subject: Re: [ydn-javascript] Continuous Update of DataTable

              after installing FireBug i found that Mozila Firefox is giving me following error
              while accessing my servlet which is deployed on a local serve

              'Permission denied to call method XMLHttpRequest.open' when calling method'

              so please do post the solution

              Thanking You
              ntimesc


              On Dec 30, 2007 2:40 PM, Satyam < satyam@...> wrote:

              Not having access to your 'localhost' I wouldn't know.  Debugging is the only alternative.  Do you have Firefox with the Firebug add-on installed? It is the best combination for this kind of environment. That will tell you what's going on.  If you don't have experience with it, this is a good time to start.
               
              Satyam
              ----- Original Message -----
              Sent: Sunday, December 30, 2007 7:44 AM
              Subject: Re: [ydn-javascript] Continuous Update of DataTable

              When trying the same ..... i am getting "Loading Data..." inside my table
              and then nothing gonna happened .....
              So could you help me why it is showing me this

              On Dec 30, 2007 1:57 AM, Satyam < satyam@...> wrote:

              You probably have an error response in oResponse (a property called error set to true) and no results property so when trying to check for oResponse.results.length you are getting an execution error. since results is undefined and doesn't have any length property.   Check your URL or the format of the response.  You can also listen to DataSource's dataErrorEvent.
               
               
              Satyam
              ----- Original Message -----
              Sent: Saturday, December 29, 2007 7:04 PM
              Subject: Re: [ydn-javascript] Continuous Update of DataTable

              Hi,
              After creating myDataTable when I am writing following code which is described in one of the examples of YUI


              var num=myDataSource.sendRequest(" http://localhost:8080/beerv1/Data.do?item=infy"
                                          ,
                                          function(oRequest,oResponse) {

                                              alert("There are " + oResponse.results.length + "Data Item");
                                          },
                                          this


                                      );


              I am not getting the alert box displaying length of data. So once i cleared with this then i will go for setInterval.

              but for do you have any idea why this code is not working....


              On Dec 29, 2007 11:04 PM, Satyam <satyam@...> wrote:

              Once you have built the DataTable, keep the reference to the DataSource, lets call it myDataSource, and you can do:
               
              myDataSource.setInterval(3000, myDataTable.get('initialRequest'),myDataTable.onDataReturnInitializeTable,myDataTable);
               
              I'm assuming that for each refresh you will repeat the same GET url arguments as for the first one, which might not be the case.  The string with the url-encoded arguments goes into the second argument to setInterval.  I'm reading the same used for the initial request, but you may change them to whatever your server might expect, though they can't be changed for each individual refresh.  If you need to change them, use method sendRequest (it uses the same arguments but the first) and with window.setInterval providing the timing so you have control over the argument in between refreshes.
               
              See:
               
              Satyam
               
               
               
              ----- Original Message -----
              Sent: Saturday, December 29, 2007 5:37 PM
              Subject: [ydn-javascript] Continuous Update of DataTable

              Hi,

              I want my data table to be filled with data which is sent by my remote server but i want to poll the server after every 3 seconds.

              So eventually i want my data table would poll the server after 3 seconds and update itself continuously.

              My server is returning the data in a string format with ,(Comma) separated fields.

              So please do post some code or guideline

              Any Help would be appreciable

              Thanking You
              ntimesc


              No virus found in this incoming message.
              Checked by AVG Free Edition.
              Version: 7.5.516 / Virus Database: 269.17.11/1201 - Release Date: 28/12/2007 11:51


              No virus found in this incoming message.
              Checked by AVG Free Edition.
              Version: 7.5.516 / Virus Database: 269.17.11/1201 - Release Date: 28/12/2007 11:51


              No virus found in this incoming message.
              Checked by AVG Free Edition.
              Version: 7.5.516 / Virus Database: 269.17.12/1202 - Release Date: 29/12/2007 13:27


              No virus found in this incoming message.
              Checked by AVG Free Edition.
              Version: 7.5.516 / Virus Database: 269.17.13/1206 - Release Date: 01/01/2008 12:09


              No virus found in this incoming message.
              Checked by AVG Free Edition.
              Version: 7.5.516 / Virus Database: 269.17.13/1206 - Release Date: 01/01/2008 12:09


              No virus found in this incoming message.
              Checked by AVG Free Edition.
              Version: 7.5.516 / Virus Database: 269.17.13/1206 - Release Date: 01/01/2008 12:09
            • nihar bhatt
              Thanks !!! that was my fault... Well now the scenario is When Old data in a data table changes by the new Response at that time i want to make a check ... like
              Message 6 of 17 , Jan 4, 2008
              • 0 Attachment
                Thanks !!! that was my fault...


                Well now the scenario is

                When Old data in a data table changes by the new Response at that time i
                want to make a check ... like comparing values..... old with new and based on that i
                want to change color of a particular cell.

                like in Market watch for stock market......

                if the rate of a particular company changes then we have to flash that cell to indicate the change in a stock price.

                Hope you understand the problem


                Thanks .....
                ntimesc







                On Jan 3, 2008 1:46 PM, Satyam <satyam@...
                > wrote:

                There are 8 fields declared and only 7 available, field "Mics" seems to be missing.
                ----- Original Message -----
                Sent: Thursday, January 03, 2008 4:32 AM
                Subject: Re: [ydn-javascript] Continuous Update of DataTable

                Ok Dear I agreed   :) .... i have no problem to post the code in public
                so here it is

                <script type="text/javascript">
                YAHOO.util.Event.addListener(window, "load", function() {
                    YAHOO.example.SData = new function() {
                        var myColumnDefs = [
                            {key:"CompanyName"},
                            {key:"TName"},
                            {key:"Open"},
                            {key:"High"},
                            {key:"Low"},
                            {key:"Change"},
                            {key:"Mics"},
                            {key:"Volume"}

                        ];

                        this.myDataSource = new YAHOO.util.DataSource ("http://localhost:8080/beerv1/DataStock.do?");

                        this.myDataSource.responseType = YAHOO.util.DataSource.TYPE_TEXT;
                        this.myDataSource.responseSchema = {
                        recordDelim: "\n",
                        fieldDelim: ",",

                            fields: ["CompanyName","TName","Open","High","Low","Change","Mics","Volume"]
                        };


                       this.myDataTable = new YAHOO.widget.DataTable("sdata",myColumnDefs, this.myDataSource, {caption:"DataTable Caption", initialRequest:'stock=infy'});

                      
                    };
                });
                </script>

                my servlet is returning a reponse in a following string format

                INFY,INFY INC.,33.2,22.3,11.3,0.33%,34543

                Above response is visible in FireBug and even in oParsedResponse of doBeforeCallback function....


                ntimesc


                On Jan 3, 2008 1:56 AM, Satyam <satyam@...> wrote:

                No one can post a solution because nobody knows what your problem might be.  What you are doing is nothing exceptional, it shouldn't be hard.  So, unless you place it in a public place for people to see, there isn't much anyone can say.
                 
                Satyam
                 
                 
                ----- Original Message -----
                Sent: Wednesday, January 02, 2008 6:46 PM
                Subject: Re: [ydn-javascript] Continuous Update of DataTable

                Finally I Solved the problem of "Permission Denial" but now a new problem arises

                Now i am getting "No Records Found" error in the data table.

                When i am trying to track the oParsedResponse in doBeforeCallback using alert function
                and even in FireBug i am getting proper result, but in data table it is showing me "No Records Found".

                So please do post the solution

                ntimesc



                On Jan 2, 2008 9:20 PM, Satyam < satyam@...> wrote:

                Are you requesting the data from the same host that you are requesting the page?  It is called 'same origin policy', you can search for that, it's even in Wikipedia.
                 
                Satyam
                 
                ----- Original Message -----
                Sent: Wednesday, January 02, 2008 11:09 AM
                Subject: Re: [ydn-javascript] Continuous Update of DataTable

                after installing FireBug i found that Mozila Firefox is giving me following error
                while accessing my servlet which is deployed on a local serve

                'Permission denied to call method XMLHttpRequest.open' when calling method'

                so please do post the solution

                Thanking You
                ntimesc


                On Dec 30, 2007 2:40 PM, Satyam < satyam@...> wrote:

                Not having access to your 'localhost' I wouldn't know.  Debugging is the only alternative.  Do you have Firefox with the Firebug add-on installed? It is the best combination for this kind of environment. That will tell you what's going on.  If you don't have experience with it, this is a good time to start.
                 
                Satyam
                ----- Original Message -----
                Sent: Sunday, December 30, 2007 7:44 AM
                Subject: Re: [ydn-javascript] Continuous Update of DataTable

                When trying the same ..... i am getting "Loading Data..." inside my table
                and then nothing gonna happened .....
                So could you help me why it is showing me this

                On Dec 30, 2007 1:57 AM, Satyam < satyam@...> wrote:

                You probably have an error response in oResponse (a property called error set to true) and no results property so when trying to check for oResponse.results.length you are getting an execution error. since results is undefined and doesn't have any length property.   Check your URL or the format of the response.  You can also listen to DataSource's dataErrorEvent.
                 
                 
                Satyam
                ----- Original Message -----
                Sent: Saturday, December 29, 2007 7:04 PM
                Subject: Re: [ydn-javascript] Continuous Update of DataTable

                Hi,
                After creating myDataTable when I am writing following code which is described in one of the examples of YUI


                var num=myDataSource.sendRequest(" http://localhost:8080/beerv1/Data.do?item=infy"
                                            ,
                                            function(oRequest,oResponse) {

                                                alert("There are " + oResponse.results.length + "Data Item");
                                            },
                                            this


                                        );


                I am not getting the alert box displaying length of data. So once i cleared with this then i will go for setInterval.

                but for do you have any idea why this code is not working....


                On Dec 29, 2007 11:04 PM, Satyam <satyam@...> wrote:

                Once you have built the DataTable, keep the reference to the DataSource, lets call it myDataSource, and you can do:
                 
                myDataSource.setInterval(3000, myDataTable.get('initialRequest'),myDataTable.onDataReturnInitializeTable,myDataTable);
                 
                I'm assuming that for each refresh you will repeat the same GET url arguments as for the first one, which might not be the case.  The string with the url-encoded arguments goes into the second argument to setInterval.  I'm reading the same used for the initial request, but you may change them to whatever your server might expect, though they can't be changed for each individual refresh.  If you need to change them, use method sendRequest (it uses the same arguments but the first) and with window.setInterval providing the timing so you have control over the argument in between refreshes.
                 
                See:
                 
                Satyam
                 
                 
                 
                ----- Original Message -----
                Sent: Saturday, December 29, 2007 5:37 PM
                Subject: [ydn-javascript] Continuous Update of DataTable

                Hi,

                I want my data table to be filled with data which is sent by my remote server but i want to poll the server after every 3 seconds.

                So eventually i want my data table would poll the server after 3 seconds and update itself continuously.

                My server is returning the data in a string format with ,(Comma) separated fields.

                So please do post some code or guideline

                Any Help would be appreciable

                Thanking You
                ntimesc


                No virus found in this incoming message.
                Checked by AVG Free Edition.
                Version: 7.5.516 / Virus Database: 269.17.11/1201 - Release Date: 28/12/2007 11:51


                No virus found in this incoming message.
                Checked by AVG Free Edition.
                Version: 7.5.516 / Virus Database: 269.17.11/1201 - Release Date: 28/12/2007 11:51


                No virus found in this incoming message.
                Checked by AVG Free Edition.
                Version: 7.5.516 / Virus Database: 269.17.12/1202 - Release Date: 29/12/2007 13:27


                No virus found in this incoming message.
                Checked by AVG Free Edition.
                Version: 7.5.516 / Virus Database: 269.17.13/1206 - Release Date: 01/01/2008 12:09


                No virus found in this incoming message.
                Checked by AVG Free Edition.
                Version: 7.5.516 / Virus Database: 269.17.13/1206 - Release Date: 01/01/2008 12:09


                No virus found in this incoming message.
                Checked by AVG Free Edition.
                Version: 7.5.516 / Virus Database: 269.17.13/1206 - Release Date: 01/01/2008 12:09

              • Satyam
                The DataTable cannot help you with that, it will replace one set of data with the new one so you will have nothing to compare it with. You can, though,
                Message 7 of 17 , Jan 4, 2008
                • 0 Attachment
                  The DataTable cannot help you with that, it will replace one set of data with the new one so you will have nothing to compare it with.  You can, though, separate the retrieval of data from its presentation so that you have a chance to process it (in this case compare it with a previous version of the same) and then provide it to the DataTable (with the extra 'color' information added) for it to display it.  Once the DataTable gets the data, it can use a formatter function on any of its columns to read the color information and paint the row whichever way you want it.
                   
                  Satyam
                  ----- Original Message -----
                  Sent: Friday, January 04, 2008 1:51 PM
                  Subject: Re: [ydn-javascript] Continuous Update of DataTable

                  Thanks !!! that was my fault...


                  Well now the scenario is

                  When Old data in a data table changes by the new Response at that time i
                  want to make a check ... like comparing values..... old with new and based on that i
                  want to change color of a particular cell.

                  like in Market watch for stock market......

                  if the rate of a particular company changes then we have to flash that cell to indicate the change in a stock price.

                  Hope you understand the problem


                  Thanks .....
                  ntimesc


                • ayigal
                  Hi, I m using the sortable option on the datatable columns and the continuous update resets the sorting that was done by the user. Is there anyway to refresh
                  Message 8 of 17 , Jan 30, 2008
                  • 0 Attachment
                    Hi,

                    I'm using the "sortable" option on the datatable columns and the
                    continuous update resets the sorting that was done by the user. Is
                    there anyway to refresh the data and keep the existing sorting?
                    Alternatively is there a way to make the server do the sorting?

                    Thanks,

                    -- Asaf.

                    --- In ydn-javascript@yahoogroups.com, "Satyam" <satyam@...> wrote:
                    >
                    > The DataTable cannot help you with that, it will replace one set of
                    data with the new one so you will have nothing to compare it with.
                    You can, though, separate the retrieval of data from its presentation
                    so that you have a chance to process it (in this case compare it with
                    a previous version of the same) and then provide it to the DataTable
                    (with the extra 'color' information added) for it to display it. Once
                    the DataTable gets the data, it can use a formatter function on any of
                    its columns to read the color information and paint the row whichever
                    way you want it.
                    >
                    > Satyam
                    > ----- Original Message -----
                    > From: nihar bhatt
                    > To: ydn-javascript@yahoogroups.com
                    > Sent: Friday, January 04, 2008 1:51 PM
                    > Subject: Re: [ydn-javascript] Continuous Update of DataTable
                    >
                    >
                    > Thanks !!! that was my fault...
                    >
                    >
                    > Well now the scenario is
                    >
                    > When Old data in a data table changes by the new Response at that
                    time i
                    > want to make a check ... like comparing values..... old with new
                    and based on that i
                    > want to change color of a particular cell.
                    >
                    > like in Market watch for stock market......
                    >
                    > if the rate of a particular company changes then we have to flash
                    that cell to indicate the change in a stock price.
                    >
                    > Hope you understand the problem
                    >
                    >
                    > Thanks .....
                    > ntimesc
                    >
                  • Satyam
                    The sortedBy configuration attribute only signals the DataTable which column to highlight as sorted. You could use method sortColumn to sort the data again
                    Message 9 of 17 , Jan 30, 2008
                    • 0 Attachment
                      The sortedBy configuration attribute only signals the DataTable which column
                      to highlight as sorted. You could use method sortColumn to sort the data
                      again when it is received but doing it on the client side is not
                      particularly efficient and will produce an extra blinking on the data. The
                      best is to have the server do the sorting since database servers are highly
                      optimized to do so. You can use the sortedBy configuration attribute and
                      append them as arguments to the URL and have the server read them and modify
                      the SELECT statement accordingly. You reach the sortedBy attributes with
                      the get method: myDataTable.get('sortedBy') (get is inherited from Element
                      so it is not documented along the DataTable).

                      Satyam

                      ----- Original Message -----
                      From: "ayigal" <asaf.yigal@...>
                      To: <ydn-javascript@yahoogroups.com>
                      Sent: Wednesday, January 30, 2008 12:04 PM
                      Subject: [ydn-javascript] Re: Continuous Update of DataTable


                      > Hi,
                      >
                      > I'm using the "sortable" option on the datatable columns and the
                      > continuous update resets the sorting that was done by the user. Is
                      > there anyway to refresh the data and keep the existing sorting?
                      > Alternatively is there a way to make the server do the sorting?
                      >
                      > Thanks,
                      >
                      > -- Asaf.
                      >
                      > --- In ydn-javascript@yahoogroups.com, "Satyam" <satyam@...> wrote:
                      >>
                      >> The DataTable cannot help you with that, it will replace one set of
                      > data with the new one so you will have nothing to compare it with.
                      > You can, though, separate the retrieval of data from its presentation
                      > so that you have a chance to process it (in this case compare it with
                      > a previous version of the same) and then provide it to the DataTable
                      > (with the extra 'color' information added) for it to display it. Once
                      > the DataTable gets the data, it can use a formatter function on any of
                      > its columns to read the color information and paint the row whichever
                      > way you want it.
                      >>
                      >> Satyam
                      >> ----- Original Message -----
                      >> From: nihar bhatt
                      >> To: ydn-javascript@yahoogroups.com
                      >> Sent: Friday, January 04, 2008 1:51 PM
                      >> Subject: Re: [ydn-javascript] Continuous Update of DataTable
                      >>
                      >>
                      >> Thanks !!! that was my fault...
                      >>
                      >>
                      >> Well now the scenario is
                      >>
                      >> When Old data in a data table changes by the new Response at that
                      > time i
                      >> want to make a check ... like comparing values..... old with new
                      > and based on that i
                      >> want to change color of a particular cell.
                      >>
                      >> like in Market watch for stock market......
                      >>
                      >> if the rate of a particular company changes then we have to flash
                      > that cell to indicate the change in a stock price.
                      >>
                      >> Hope you understand the problem
                      >>
                      >>
                      >> Thanks .....
                      >> ntimesc
                      >>
                      >
                      >
                      >
                      >
                      >
                      > Yahoo! Groups Links
                      >
                      >
                      >
                      >
                      >
                      > --
                      > No virus found in this incoming message.
                      > Checked by AVG Free Edition.
                      > Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date:
                      > 29/01/2008 22:20
                      >
                      >
                    Your message has been successfully submitted and would be delivered to recipients shortly.