title: Google auto complete on textbox?
body: <p>I want to show all google search auto completes in a textbox.
  After searching google i found "<a href="http://google.com/complete/search?output=toolbar&amp;q=test" rel="nofollow">http://google.com/complete/search?output=toolbar&amp;q=test</a>" link that is return a xml data contains ten google search suggets.
  My jQuery code for showing this xml values is :</p>
  
  <pre><code>$(window).ready(function(){
      $( "#textbox" ).keypress = showSuggest();
  });
  function showSuggest() {
      $.ajax({
          type: "GET",
          url: "http://google.com/complete/search?output=toolbar&amp;q=" + $("#textbox").val(),
          dataType: "xml",
          var data = [];
          success: function(xml) {
              $(xml).find('CompleteSuggestion').each(function(){
              data.push($(this).find('suggestion')[0].attr('data'));
          });
          }
      });
      $( "#textbox" ).autocomplete({
          source: data
      });
  }
  </code></pre>
  
  <p>jquery-1.9.1.js and jquery-ui-1.10.3 was imported but this code not working.
  sorry for my bad english.
  thanks.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>thanks to everyone.
  i edit my code and remove xml reading part and replace</p>
  
  <pre><code>url: "http://google.com/complete/search?output=toolbar&amp;q=" + $("#textbox").val()
  $("#textbox").autocomplete({
     source: data
  });
  </code></pre>
  
  <p>with this :</p>
  
  <pre><code>$( "#textbox" ).autocomplete({
  source: "http://suggestqueries.google.com/complete/search?client=firefox&amp;q=" + $( "#textbox" ).val()
  });
  </code></pre>
  
  <p>now on typing text only show progress image left side of textbox and still not showing suggets.
  please help.</p>
  
  <p><strong>NEW UPDATE</strong></p>
  
  <p>I write new code with firefox DOMParser but still not working.</p>
  
  <pre><code>    $("#textbox").keypress(function() {
      var data = [];
      var parser = new DOMParser();
      var xml = parser.parseFromString("http://google.com/complete/search?output=toolbar&amp;q=" + $("#new-tag-post_tag").val(), "application/xml");
      xml.domain = "google.com";
      suggests = getElementsByTagName("CompleteSuggestion");
      for (var i = 0; i &lt; suggests.length; i++) {
          data.push(suggests[i]);
      }
      $( "#textbox" ).autocomplete({
          source: data
      });
  }
  </code></pre>