title: javascript, tree scrollIntoView won't scroll
body: <p>I need to get all the links in a page, and i do get them, the problem is the href exist twice in the website, to not get the link twice i did a little trick with the variables :</p>
  
  <pre><code>getAlllinks: function()
  {
      var links = content.document.getElementsByTagName("a");
  
      var entries = new Array;
      var liens = new Array;
  
      for(var i = 0; i&lt;links.length; i++)
      {
          if(entries.indexOf(links[i].href) == -1)
          {
              entries.push(links[i].href);
              liens.push(links[i]);
          }
      }
  
  
      return links;
  }
  </code></pre>
  
  <p>ok till now everything is fine, i put the links in a tree (Xul) and all, but my problem starts from here on, i use <code>scrollIntoView</code> to scroll to the link</p>
  
  <pre><code>var tree = document.getElementById("Tree_links");
  var tbo = tree.boxObject;
  var row = { }, col = { }, child = { };
  tbo.getCellAt(event.clientX, event.clientY, row, col, child);
  var cellText = tree.view.getCellText(row.value, col.value);
  
  var links = new Array;
  links = cleanLinks();
  
  for (var i = 0; i &lt; links.length; i++) 
  {
      if (links[i].href === cellText.toString()) 
      {
          links[i].scrollIntoView("true");
          if(links[i].style.backgroundColor == "rgb(255, 255, 0)")
          {
              links[i].style.backgroundColor='transparent';
          }
          else
          {
              links[i].style.backgroundColor='#ffff00';
          }
      }
  }
  </code></pre>
  
  <p>it won't scroll for the links that are twice in the page, BUT if i put all the links (twice or single) in the tree it does scroll.</p>
  
  <p>thanks in advance.</p>