On Saturday 01 July 2006 07:07, Kjell Bublitz wrote:
> Hi all
>
> For a project i am playing around with the Ajax.Autocompleter. It has
> basicly the functionality i need but with the little difference that i
> would rather use it as LiveSearch with clickable links instead of
> auto-completing a inputfield. Any ideas how i can make it so that, if a
> user selects a result it does not go to the inputfield but the link/result
> he chooses (either with keyboard+enter or mousclick) will be launched?

check out what I did for g-p:
http://gentoo-portage.com/

The code I wrote is buried deep inside /js/main.js in the 
Ajax.XMLAutocompleter class.  Note that this is *not* a generic class, it's 
in fact very very specific :)  I may turn it into a more generic class at a 
later time, but the concept is shown.

Mike wanted to be able to return an XML document and have that parsed on the 
client-side, so I overrode the onComplete method to parse/build the request 
content myself.

Unfortunately, it expects the text of the content for the drop down rather 
than the DOM node to append, but, meh, innerHTML *does* perform faster on 
*every* browser than DOM manipulation, sadly ;)

-Jeremy

-- 
Jeremy Kitchen ++ [EMAIL PROTECTED]

http://www.pirate-party.us/ -- defend your rights

Attachment: pgphb54wmg0Qk.pgp
Description: PGP signature

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to