Youth culture killed my dog

XMLHttpRequest is your buddy
14 Aug 04 - http://www.papermountain.org/blog/index.cgi/Tech/Ruby/AutoCompleteXMLHttpRequest.txl

I’ve added an autocomplete feature to liveUpdater.js that I’ve been harping on lately. The javascript is a bit more involved now, but I don’t think the Borges side of things has lost any of it’s charm.


  r.text_input_with_autocomplete(proc {}) do |text|
    if text.length > 0
      `grep -m 40 -i \"^#{text}\" /usr/share/dict/words`.split
    end
  end

I’ve set up a demo for your autocompleting pleasure. It seems to work ok on IE6 and Mozilla 1.7.2, but I’m sure it needs some work for other browsers. I would appreciate any patches that improve support for other browsers, fix bugs, or just clean up the javascript in general (I’m not quite a master of that language).