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

23315Re: [ydn-javascript] Continuous Update of DataTable

Expand Messages
  • nihar bhatt
    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

    • Show all 17 messages in this topic