title: Ajax extraction array
body: <p>I write here my little question about ajax and javascript function...
  I work on little application who take some data with my server ...all work well ...my question is this...i save the data from ajax on array create out side the function ,if i call it inside the function work well but if i call out side the array is empty...
  This is the code ...</p>
  
  <pre><code>function ProcDatJSON() {
      if (Xrt.readyState == 4) {
          var data = JSON.parse(Xrt.responseText); 
          for(i=0; i &lt; data.link.length; i++)
          {   
              vect.push(data.link[i].title);
              vect.push(data.link[i].uri);
              blockRight.push(vect);   
          }
          document.getElementById("tab1").appendChild(document.createTextNode(blockRight[0]));
      }
  }
  </code></pre>
  
  <p>So i put</p>
  
  <pre><code>Xrt.onreadystatuschange=ProDatJSON;
  </code></pre>
  
  <p>And print on broswe the value...but if i call the array as</p>
  
  <pre><code>document.writeln(blockRight[0])
  </code></pre>
  
  <p>Not give me the value but undefinited.</p>