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

Showing JSON data

Expand Messages
  • info2hussain
    Hi All, I am retrieving data using YUI s Connection manager and trying to show them in the browser. I can retrieve the data correctly but don t know why it is
    Message 1 of 10 , Jul 30 5:47 AM
    • 0 Attachment
      Hi All,

      I am retrieving data using YUI's Connection manager and trying to show
      them in the browser. I can retrieve the data correctly but don't know
      why it is not been shown in the browser. The data I am retrieving is
      like:

      [
      {"result":

      [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-\
      history#assign1activityInstance8"}]
      },

      {"result":

      [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-\
      history#sequence-activity-line-46sequence-activity-line-46activityInstan\
      ce2"}]
      },

      {"result":

      [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-\
      history#endactivityInstance10"}]},{"result":[{"variable":"?X","value":"h\
      ttp://www.ip-super.org/ontologies/execution-history#startactivityInstanc\
      e4"}]
      }
      ]

      My Java Script code are as follows:

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
      "http://www.w3.org/TR/html4/strict.dtd">
      <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html;
      charset=iso-8859-1" />
      <title>Untitled Document</title>
      <script type="text/javascript"
      src="http://yui.yahooapis.com/2.5.1/build/yahoo/yahoo-min.js"></script>
      <script type="text/javascript"
      src="http://yui.yahooapis.com/2.5.2/build/event/event-min.js"></script>
      <script type="text/javascript"
      src="http://yui.yahooapis.com/2.5.2/build/connection/connection-min.js">\
      </script>
      <script type="text/javascript"
      src="http://yui.yahooapis.com/2.5.1/build/json/json-min.js"></script>

      <script>
      function XHRData(){
      var callbacks = {
      // Successful XHR response handler
      success : function (o) {
      var messages = [];

      // Use the JSON Utility to parse the data
      returned from the server
      try {
      messages =
      YAHOO.lang.JSON.parse(o.responseText);
      }
      catch (x) {
      alert("JSON Parse failed!");
      return;
      }

      // The returned data was parsed into an array of
      objects.
      // Add a P element for each received message
      len = messages.length;

      for (var i = 0; i < len; ++i) {
      var m = messages[i];
      var p = document.createElement('p');
      var message_text = document.createTextNode(
      m.value);
      p.appendChild(message_text);
      msg_section.appendChild(p);
      }
      }


      };

      // Make the call to the server for JSON data

      YAHOO.util.Connect.asyncRequest('GET',"/api-rest/query?f=json&o=executio\
      n-history&q=(setofall%20%3Fx%20(instance-of%20%3Fx%20%23_COBRA%3AActivit\
      yInstance))", callbacks);

      }
      </script>

      </head>
      <body onload="XHRData();">
      </body>
      </html>


      I can see in the firebug that data are retrieved properly from the
      server.

      Any one has any idea why it is not being shown? Any suggestion is
      welcomed.

      Thanks,
      H
    • Satyam
      Where is msg_section? You are appending everything to that, but I don t see it defined anywhere. Satyam
      Message 2 of 10 , Jul 30 6:40 AM
      • 0 Attachment
        Where is msg_section? You are appending everything to that, but I don't
        see it defined anywhere.

        Satyam


        info2hussain wrote:
        > Hi All,
        >
        > I am retrieving data using YUI's Connection manager and trying to show
        > them in the browser. I can retrieve the data correctly but don't know
        > why it is not been shown in the browser. The data I am retrieving is
        > like:
        >
        > [
        > {"result":
        >
        > [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-\
        > history#assign1activityInstance8"}]
        > },
        >
        > {"result":
        >
        > [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-\
        > history#sequence-activity-line-46sequence-activity-line-46activityInstan\
        > ce2"}]
        > },
        >
        > {"result":
        >
        > [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-\
        > history#endactivityInstance10"}]},{"result":[{"variable":"?X","value":"h\
        > ttp://www.ip-super.org/ontologies/execution-history#startactivityInstanc\
        > e4"}]
        > }
        > ]
        >
        > My Java Script code are as follows:
        >
        > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        > "http://www.w3.org/TR/html4/strict.dtd">
        > <html>
        > <head>
        > <meta http-equiv="Content-Type" content="text/html;
        > charset=iso-8859-1" />
        > <title>Untitled Document</title>
        > <script type="text/javascript"
        > src="http://yui.yahooapis.com/2.5.1/build/yahoo/yahoo-min.js"></script>
        > <script type="text/javascript"
        > src="http://yui.yahooapis.com/2.5.2/build/event/event-min.js"></script>
        > <script type="text/javascript"
        > src="http://yui.yahooapis.com/2.5.2/build/connection/connection-min.js">\
        > </script>
        > <script type="text/javascript"
        > src="http://yui.yahooapis.com/2.5.1/build/json/json-min.js"></script>
        >
        > <script>
        > function XHRData(){
        > var callbacks = {
        > // Successful XHR response handler
        > success : function (o) {
        > var messages = [];
        >
        > // Use the JSON Utility to parse the data
        > returned from the server
        > try {
        > messages =
        > YAHOO.lang.JSON.parse(o.responseText);
        > }
        > catch (x) {
        > alert("JSON Parse failed!");
        > return;
        > }
        >
        > // The returned data was parsed into an array of
        > objects.
        > // Add a P element for each received message
        > len = messages.length;
        >
        > for (var i = 0; i < len; ++i) {
        > var m = messages[i];
        > var p = document.createElement('p');
        > var message_text = document.createTextNode(
        > m.value);
        > p.appendChild(message_text);
        > msg_section.appendChild(p);
        > }
        > }
        >
        >
        > };
        >
        > // Make the call to the server for JSON data
        >
        > YAHOO.util.Connect.asyncRequest('GET',"/api-rest/query?f=json&o=executio\
        > n-history&q=(setofall%20%3Fx%20(instance-of%20%3Fx%20%23_COBRA%3AActivit\
        > yInstance))", callbacks);
        >
        > }
        > </script>
        >
        > </head>
        > <body onload="XHRData();">
        > </body>
        > </html>
        >
        >
        > I can see in the firebug that data are retrieved properly from the
        > server.
        >
        > Any one has any idea why it is not being shown? Any suggestion is
        > welcomed.
        >
        > Thanks,
        > H
        >
        >
        >
        > ------------------------------------
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        > No virus found in this incoming message.
        > Checked by AVG - http://www.avg.com
        > Version: 8.0.138 / Virus Database: 270.5.6/1579 - Release Date: 29/07/2008 6:43
        >
        >
        >
        >
      • info2hussain
        Hi Satyam, Sorry about the mistake. I have now defined a div element called msg_section but still no data is displayed. I am just wondering if my code to
        Message 3 of 10 , Jul 30 7:30 AM
        • 0 Attachment
          Hi Satyam,

          Sorry about the mistake. I have now defined a div element called
          msg_section but still no data is displayed. I am just wondering if my
          code to access the JSON data in the array is right. Do u think 'var
          message_text = document.createTextNode(m.value);' gives me the proper
          access of the JSON data? If not, then can u pls suggest something?
          Just for a quick reminder, my data are like below:

          [
          {"result":

          [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-history#assign1activityInstance8"}]
          },

          {"result":

          [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-history#sequence-activity-line-46sequence-activity-line-46activityInstance2"}]
          },

          {"result":

          [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-history#endactivityInstance10"}]
          },

          {"result":

          [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-history#startactivityInstance4"}]
          }
          ]


          Thanks,
          H


          --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
          >
          > Where is msg_section? You are appending everything to that, but I
          don't
          > see it defined anywhere.
          >
          > Satyam
          >
          >
          > info2hussain wrote:
          > > Hi All,
          > >
          > > I am retrieving data using YUI's Connection manager and trying to show
          > > them in the browser. I can retrieve the data correctly but don't know
          > > why it is not been shown in the browser. The data I am retrieving is
          > > like:
          > >
          > > [
          > > {"result":
          > >
          > >
          [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-\
          > > history#assign1activityInstance8"}]
          > > },
          > >
          > > {"result":
          > >
          > >
          [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-\
          > >
          history#sequence-activity-line-46sequence-activity-line-46activityInstan\
          > > ce2"}]
          > > },
          > >
          > > {"result":
          > >
          > >
          [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-\
          > >
          history#endactivityInstance10"}]},{"result":[{"variable":"?X","value":"h\
          > >
          ttp://www.ip-super.org/ontologies/execution-history#startactivityInstanc\
          > > e4"}]
          > > }
          > > ]
          > >
          > > My Java Script code are as follows:
          > >
          > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
          > > "http://www.w3.org/TR/html4/strict.dtd">
          > > <html>
          > > <head>
          > > <meta http-equiv="Content-Type" content="text/html;
          > > charset=iso-8859-1" />
          > > <title>Untitled Document</title>
          > > <script type="text/javascript"
          > >
          src="http://yui.yahooapis.com/2.5.1/build/yahoo/yahoo-min.js"></script>
          > > <script type="text/javascript"
          > >
          src="http://yui.yahooapis.com/2.5.2/build/event/event-min.js"></script>
          > > <script type="text/javascript"
          > >
          src="http://yui.yahooapis.com/2.5.2/build/connection/connection-min.js">\
          > > </script>
          > > <script type="text/javascript"
          > > src="http://yui.yahooapis.com/2.5.1/build/json/json-min.js"></script>
          > >
          > > <script>
          > > function XHRData(){
          > > var callbacks = {
          > > // Successful XHR response handler
          > > success : function (o) {
          > > var messages = [];
          > >
          > > // Use the JSON Utility to parse the data
          > > returned from the server
          > > try {
          > > messages =
          > > YAHOO.lang.JSON.parse(o.responseText);
          > > }
          > > catch (x) {
          > > alert("JSON Parse failed!");
          > > return;
          > > }
          > >
          > > // The returned data was parsed into an
          array of
          > > objects.
          > > // Add a P element for each received message
          > > len = messages.length;
          > >
          > > for (var i = 0; i < len; ++i) {
          > > var m = messages[i];
          > > var p = document.createElement('p');
          > > var message_text =
          document.createTextNode(
          > > m.value);
          > > p.appendChild(message_text);
          > > msg_section.appendChild(p);
          > > }
          > > }
          > >
          > >
          > > };
          > >
          > > // Make the call to the server for JSON data
          > >
          > >
          YAHOO.util.Connect.asyncRequest('GET',"/api-rest/query?f=json&o=executio\
          > >
          n-history&q=(setofall%20%3Fx%20(instance-of%20%3Fx%20%23_COBRA%3AActivit\
          > > yInstance))", callbacks);
          > >
          > > }
          > > </script>
          > >
          > > </head>
          > > <body onload="XHRData();">
          > > </body>
          > > </html>
          > >
          > >
          > > I can see in the firebug that data are retrieved properly from the
          > > server.
          > >
          > > Any one has any idea why it is not being shown? Any suggestion is
          > > welcomed.
          > >
          > > Thanks,
          > > H
          > >
          > >
          > >
          > > ------------------------------------
          > >
          > > Yahoo! Groups Links
          > >
          > >
          > >
          > >
          > > No virus found in this incoming message.
          > > Checked by AVG - http://www.avg.com
          > > Version: 8.0.138 / Virus Database: 270.5.6/1579 - Release Date:
          29/07/2008 6:43
          > >
          > >
          > >
          > >
          >
        • Satyam
          it would probably be m.result[0].value and if you just added a div with id msg_section, it won t work either. Satyam info2hussain wrote: Hi Satyam, Sorry about
          Message 4 of 10 , Jul 30 10:11 AM
          • 0 Attachment
            it would probably be m.result[0].value and if you just added a div with id msg_section, it won't work either.

            Satyam


            info2hussain wrote:
            Hi Satyam,
            
            Sorry about the mistake. I have now defined a div element called
            msg_section  but still no data is displayed. I am just wondering if my
            code to access the JSON data in the array is right. Do u think 'var
            message_text = document.createTextNode(m.value);' gives me the proper
            access of the JSON data? If not, then can u pls suggest something?
            Just for a quick reminder, my data are like below:
            
            [
               {"result":
                 
            [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-history#assign1activityInstance8"}]
               },
            
               {"result":
                 
            [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-history#sequence-activity-line-46sequence-activity-line-46activityInstance2"}]
               },
            
               {"result":
                 
            [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-history#endactivityInstance10"}]
               },
               
               {"result":
                 
            [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-history#startactivityInstance4"}]
               }
            ]
            
            
            Thanks,
            H
            
            
            --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
              
            Where is msg_section?  You are appending everything to that, but I
                
            don't 
              
            see it defined anywhere.
            
            Satyam
            
            
            info2hussain wrote:
                
            Hi All,
            
            I am retrieving data using YUI's Connection manager and trying to show
            them in the browser. I can retrieve the data correctly but don't know
            why it is not been shown in the browser. The data I am retrieving is
            like:
            
            [
                {"result":
             
            
                  
            [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-\
              
            history#assign1activityInstance8"}]
                },
            
                {"result":
             
            
                  
            [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-\
              
            history#sequence-activity-line-46sequence-activity-line-46activityInstan\
              
            ce2"}]
                },
            
                {"result":
             
            
                  
            [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-\
              
            history#endactivityInstance10"}]},{"result":[{"variable":"?X","value":"h\
              
            ttp://www.ip-super.org/ontologies/execution-history#startactivityInstanc\
              
            e4"}]
                }
            ]
            
            My Java Script code are as follows:
            
            <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
            "http://www.w3.org/TR/html4/strict.dtd">
            <html>
                 <head>
                     <meta http-equiv="Content-Type" content="text/html;
            charset=iso-8859-1" />
                     <title>Untitled Document</title>
                     <script type="text/javascript"
            
                  
            src="http://yui.yahooapis.com/2.5.1/build/yahoo/yahoo-min.js"></script>
              
                     <script type="text/javascript"
            
                  
            src="http://yui.yahooapis.com/2.5.2/build/event/event-min.js"></script>
              
                     <script type="text/javascript"
            
                  
            src="http://yui.yahooapis.com/2.5.2/build/connection/connection-min.js">\
              
            </script>
                     <script type="text/javascript"
            src="http://yui.yahooapis.com/2.5.1/build/json/json-min.js"></script>
            
                     <script>
                         function XHRData(){
                             var callbacks = {
                                 // Successful XHR response handler
                                 success : function (o) {
                                     var messages = [];
            
                                     // Use the JSON Utility to parse the data
            returned from the server
                                     try {
                                         messages =
            YAHOO.lang.JSON.parse(o.responseText);
                                     }
                                     catch (x) {
                                         alert("JSON Parse failed!");
                                         return;
                                     }
            
                                     // The returned data was parsed into an
                  
            array of
              
            objects.
                                     // Add a P element for each received message
                                     len = messages.length;
            
                                     for (var i = 0; i < len; ++i) {
                                         var m = messages[i];
                                         var p = document.createElement('p');
                                         var message_text =
                  
            document.createTextNode(
              
                                                 m.value);
                                         p.appendChild(message_text);
                                         msg_section.appendChild(p);
                                     }
                                 }
            
            
                             };
            
                         // Make the call to the server for JSON data
                        
            
                  
            YAHOO.util.Connect.asyncRequest('GET',"/api-rest/query?f=json&o=executio\
              
            n-history&q=(setofall%20%3Fx%20(instance-of%20%3Fx%20%23_COBRA%3AActivit\
              
            yInstance))", callbacks);
            
                         }
                     </script>
            
                 </head>
                 <body onload="XHRData();">
                 </body>
            </html>
            
            
            I can see in the firebug that data are retrieved properly from the
            server.
            
            Any one has any idea why it is not being shown? Any suggestion is
            welcomed.
            
            Thanks,
            H
            
            
            
            ------------------------------------
            
            Yahoo! Groups Links
            
            
            
            
            No virus found in this incoming message.
            Checked by AVG - http://www.avg.com 
            Version: 8.0.138 / Virus Database: 270.5.6/1579 - Release Date:
                  
            29/07/2008 6:43
              
            
            
                  
            
            
            ------------------------------------
            
            Yahoo! Groups Links
            
            <*> To visit your group on the web, go to:
                http://groups.yahoo.com/group/ydn-javascript/
            
            <*> Your email settings:
                Individual Email | Traditional
            
            <*> To change settings online go to:
                http://groups.yahoo.com/group/ydn-javascript/join
                (Yahoo! ID required)
            
            <*> To change settings via email:
                mailto:ydn-javascript-digest@yahoogroups.com 
                mailto:ydn-javascript-fullfeatured@yahoogroups.com
            
            <*> To unsubscribe from this group, send an email to:
                ydn-javascript-unsubscribe@yahoogroups.com
            
            <*> Your use of Yahoo! Groups is subject to:
                http://docs.yahoo.com/info/terms/
            
            
            No virus found in this incoming message.
            Checked by AVG - http://www.avg.com 
            Version: 8.0.138 / Virus Database: 270.5.6/1579 - Release Date: 29/07/2008 6:43
            
            
            
              
          • info2hussain
            Hi Satyam, Sorry about the mistake. Actually I copied the example from YUI example. Anyway, I have now defined a HTML div element called msg_section but
            Message 5 of 10 , Jul 30 10:24 AM
            • 0 Attachment
              Hi Satyam,

              Sorry about the mistake. Actually I copied the example from YUI example. Anyway, I have now defined a HTML 'div' element called
              msg_section but still no data is displayed. I am just wondering if my
              code to access the JSON data in the array is right. Do u think 'var
              message_text = document.createTextNode(m.value);' gives me the proper
              access of the JSON data? If not, then can u pls suggest something?
              Just for a quick reminder, my data are like below:

              [
              {"result":

              [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-history#\
              assign1activityInstance8
              "}]
              },

              {"result":

              [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-history#\
              sequence-activity-line-46sequence-activity-line-46activityInstance2
              "}]
              },

              {"result":

              [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-history#\
              endactivityInstance10
              "}]
              },

              {"result":

              [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-history#\
              startactivityInstance4
              "}]
              }
              ]

              After the modification new code is like the following:



              <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
              "http://www.w3.org/TR/html4/strict.dtd">
              <html>
              <head>
              <meta http-equiv="Content-Type" content="text/html;
              charset=iso-8859-1" />
              <title>Untitled Document</title>
              <script type="text/javascript"
              src="http://yui.yahooapis.com/2.5.1/build/yahoo/yahoo-min.js"></script>
              <script type="text/javascript"
              src="http://yui.yahooapis.com/2.5.2/build/event/event-min.js"></script>
              <script type="text/javascript"
              src="http://yui.yahooapis.com/2.5.2/build/connection/connection-min.js">\
              </script>
              <script type="text/javascript"
              src="http://yui.yahooapis.com/2.5.1/build/json/json-min.js"></script>

              <script>
              function XHRData(){
              var callbacks = {
              // Successful XHR response handler
              success : function (o) {
              var messages = [];

              // Use the JSON Utility to parse the data
              returned from the server
              try {
              messages =
              YAHOO.lang.JSON.parse(o.responseText);
              }
              catch (x) {
              alert("JSON Parse failed!");
              return;
              }

              // The returned data was parsed into an array of
              objects.
              // Add a P element for each received message
              len = messages.length;

              for (var i = 0; i < len; ++i) {
              var m = messages[i];
              var p = document.createElement('p');
              var message_text = document.createTextNode(
              m.value);
              p.appendChild(message_text);
              msg_section.appendChild(p);
              }
              }


              };

              // Make the call to the server for JSON data

              YAHOO.util.Connect.asyncRequest('GET',"/api-rest/query?f=json&o=executio\
              n-history&q=(setofall%20%3Fx%20(instance-of%20%3Fx%20%23_COBRA%3AActivit\
              yInstance))", callbacks);

              }
              </script>

              </head>
              <body onload="XHRData();">
              <div id=" msg_section"> </div>
              </body>
              </html>


              Do you have any idea whats going wrong now and why the data's are not shown even after successfull retrieval?


              Thanks,
              H
              --- In ydn-javascript@yahoogroups.com, "info2hussain" <info2hussain@...> wrote:
              >
              > Hi All,
              >
              > I am retrieving data using YUI's Connection manager and trying to show
              > them in the browser. I can retrieve the data correctly but don't know
              > why it is not been shown in the browser. The data I am retrieving is
              > like:
              >
              > [
              > {"result":
              >
              > [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-\
              > history#assign1activityInstance8"}]
              > },
              >
              > {"result":
              >
              > [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-\
              > history#sequence-activity-line-46sequence-activity-line-46activityInstan\
              > ce2"}]
              > },
              >
              > {"result":
              >
              > [{"variable":"?X","value":"http://www.ip-super.org/ontologies/execution-\
              > history#endactivityInstance10"}]},{"result":[{"variable":"?X","value":"h\
              > ttp://www.ip-super.org/ontologies/execution-history#startactivityInstanc\
              > e4"}]
              > }
              > ]
              >
              > My Java Script code are as follows:
              >
              > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
              > "http://www.w3.org/TR/html4/strict.dtd">
              > <html>
              > <head>
              > <meta http-equiv="Content-Type" content="text/html;
              > charset=iso-8859-1" />
              > <title>Untitled Document</title>
              > <script type="text/javascript"
              > src="http://yui.yahooapis.com/2.5.1/build/yahoo/yahoo-min.js"></script>
              > <script type="text/javascript"
              > src="http://yui.yahooapis.com/2.5.2/build/event/event-min.js"></script>
              > <script type="text/javascript"
              > src="http://yui.yahooapis.com/2.5.2/build/connection/connection-min.js">\
              > </script>
              > <script type="text/javascript"
              > src="http://yui.yahooapis.com/2.5.1/build/json/json-min.js"></script>
              >
              > <script>
              > function XHRData(){
              > var callbacks = {
              > // Successful XHR response handler
              > success : function (o) {
              > var messages = [];
              >
              > // Use the JSON Utility to parse the data
              > returned from the server
              > try {
              > messages =
              > YAHOO.lang.JSON.parse(o.responseText);
              > }
              > catch (x) {
              > alert("JSON Parse failed!");
              > return;
              > }
              >
              > // The returned data was parsed into an array of
              > objects.
              > // Add a P element for each received message
              > len = messages.length;
              >
              > for (var i = 0; i < len; ++i) {
              > var m = messages[i];
              > var p = document.createElement('p');
              > var message_text = document.createTextNode(
              > m.value);
              > p.appendChild(message_text);
              > msg_section.appendChild(p);
              > }
              > }
              >
              >
              > };
              >
              > // Make the call to the server for JSON data
              >
              > YAHOO.util.Connect.asyncRequest('GET',"/api-rest/query?f=json&o=executio\
              > n-history&q=(setofall%20%3Fx%20(instance-of%20%3Fx%20%23_COBRA%3AActivit\
              > yInstance))", callbacks);
              >
              > }
              > </script>
              >
              > </head>
              > <body onload="XHRData();">
              > </body>
              > </html>
              >
              >
              > I can see in the firebug that data are retrieved properly from the
              > server.
              >
              > Any one has any idea why it is not being shown? Any suggestion is
              > welcomed.
              >
              > Thanks,
              > H
              >
            • Frank Dietrich
              ... as he pointed out m.value might not hit the target as You have result above it on each record I would set a breakpoit in Firefox and examine what m.
              Message 6 of 10 , Jul 30 10:31 AM
              • 0 Attachment
                 
                > Sorry about the mistake. Actually I copied the example from YUI
                example. Anyway,
                > I have now defined a HTML 'div' element called msg_section but
                still no data is displayed. ...
                 
                as he pointed out m.value might not hit the target as You have "result" above it on each record
                I would set a breakpoit in Firefox and examine what "m." actually looks like. I guess he is right
                with m.result[0].value as You have an array as result - value.
                 
                You also need an object reference to the div You're appending to.  So msg_section probably
                won't work.
                 
                try something like
                 
                var oHook = document.getElementById("msg_section")
                 
                and append to oHook.
                 
                 
                Frank

                 
              • info2hussain
                Hi Frank, Thanks a lot for your reply. Actually, I am very very new to HTML, javascript and above all YUI. Can u pls explain what do you mean by setting a
                Message 7 of 10 , Jul 30 10:59 AM
                • 0 Attachment
                  Hi Frank,

                  Thanks a lot for your reply. Actually, I am very very new to HTML,
                  javascript and above all YUI. Can u pls explain what do you mean by
                  setting a breakpoint in Firefox? can u pls tell me how I can do that
                  and examine the value?

                  Thanks,
                  H

                  --- In ydn-javascript@yahoogroups.com, "Frank Dietrich"
                  <fdietrich@...> wrote:
                  >
                  >
                  > > Sorry about the mistake. Actually I copied the example from YUI
                  example. Anyway,
                  > > I have now defined a HTML 'div' element called msg_section but
                  still no data is displayed. ...
                  >
                  > as he pointed out m.value might not hit the target as You have
                  "result" above it on each record
                  > I would set a breakpoit in Firefox and examine what "m." actually
                  looks like. I guess he is right
                  > with m.result[0].value as You have an array as result - value.
                  >
                  > You also need an object reference to the div You're appending to.
                  So msg_section probably
                  > won't work.
                  >
                  > try something like
                  >
                  > var oHook = document.getElementById("msg_section")
                  >
                  > and append to oHook.
                  >
                  >
                  > Frank
                  >
                • Frank Dietrich
                  ... You ll need firebug for that, but I think You mentioned it in Your post. Call Your page and open FireBug. select script on top of the page (and if You
                  Message 8 of 10 , Jul 30 11:32 AM
                  • 0 Attachment
                    >
                    >Thanks a lot for your reply. Actually, I am very very new to HTML,
                    >javascript and above all YUI. Can u pls explain what do you mean by
                    >setting a breakpoint in Firefox? can u pls tell me how I can do that
                    >and examine the value?
                    >


                    You'll need firebug for that, but I think You mentioned it in Your post.

                    Call Your page and open FireBug.

                    select "script" on top of the page (and if You have more than one files, select Your JS file by clicking on the button on top of that.

                    If Your HTML File is "Test.html", You'll have that appearing over "Script". Clicking on that allows You to select the js file

                    Now You have Your code with the line numbers. Go down to the row we talked about and simply click on the line-Number

                    a red dot will appear.

                    Now, when You execute Your code, it will halt on that line.

                    The page is split vertically. On the righthandside You have four icons on top
                    - continue
                    - step into
                    - step over
                    - step out

                    below that, You'll see a section with all the variables currently available. Your "m" shoul also appear here. If it's an object, array or the like, You can examine it by clicking on the +

                    You'll need a moment to get familiar with that, but that's the place You need to look at. I'm quite sure You'll fall in love with this feature immediately :-D

                    HTH

                    Frank
                  • info2hussain
                    Hi Frank, Thanks a lot for your great help. In fact, this YUI forum is a great one for new people like me. I m trying to become familiar with the new thing you
                    Message 9 of 10 , Jul 30 2:22 PM
                    • 0 Attachment
                      Hi Frank,

                      Thanks a lot for your great help. In fact, this YUI forum is a great
                      one for new people like me. I'm trying to become familiar with the new
                      thing you suggested.

                      Thanks again.

                      H



                      --- In ydn-javascript@yahoogroups.com, "Frank Dietrich"
                      <fdietrich@...> wrote:
                      >
                      > >
                      > >Thanks a lot for your reply. Actually, I am very very new to HTML,
                      > >javascript and above all YUI. Can u pls explain what do you mean by
                      > >setting a breakpoint in Firefox? can u pls tell me how I can do that
                      > >and examine the value?
                      > >
                      >
                      >
                      > You'll need firebug for that, but I think You mentioned it in Your post.
                      >
                      > Call Your page and open FireBug.
                      >
                      > select "script" on top of the page (and if You have more than one
                      files, select Your JS file by clicking on the button on top of that.
                      >
                      > If Your HTML File is "Test.html", You'll have that appearing over
                      "Script". Clicking on that allows You to select the js file
                      >
                      > Now You have Your code with the line numbers. Go down to the row we
                      talked about and simply click on the line-Number
                      >
                      > a red dot will appear.
                      >
                      > Now, when You execute Your code, it will halt on that line.
                      >
                      > The page is split vertically. On the righthandside You have four
                      icons on top
                      > - continue
                      > - step into
                      > - step over
                      > - step out
                      >
                      > below that, You'll see a section with all the variables currently
                      available. Your "m" shoul also appear here. If it's an object, array
                      or the like, You can examine it by clicking on the +
                      >
                      > You'll need a moment to get familiar with that, but that's the place
                      You need to look at. I'm quite sure You'll fall in love with this
                      feature immediately :-D
                      >
                      > HTH
                      >
                      > Frank
                      >
                    • Frank Dietrich
                      ... My pleasure. I m also quite new to this, learning a lot every day and understanding You too well :-D I m sure with fireBug, You ll understand a lot more,
                      Message 10 of 10 , Jul 30 3:31 PM
                      • 0 Attachment
                        >
                        >Thanks a lot for your great help. In fact, this YUI forum is a great
                        >one for new people like me. I'm trying to become familiar with the new
                        >thing you suggested.
                        >
                        >Thanks again.
                        >

                        My pleasure. I'm also quite new to this, learning a lot every day and understanding You too well :-D

                        I'm sure with fireBug, You'll understand a lot more, because You can *see* what's working and what not.
                        Especially for the scope problem, when *this* suddenly is not *this* anymore, this is an enormous help.

                        F.
                      Your message has been successfully submitted and would be delivered to recipients shortly.