[BNM] jquery auto complete select dropdown

Julian Blundell old at w34u.com
Wed Jul 1 13:19:08 BST 2009


Imagine you have
<select>
  <option value="1">Option 1</option>
  <option value="2">Option 2</option>
etc.
</select>

Would be nice just to be able to replace with the input box and the nice
ajaxy download without having to do any further coding, it just works,
returns the value not the text with the correct name etc. feel that would
appeal to a lot of developers who are pushed for time and do not need the
full ajaxy search etc.

Thanks for the code.

Jules

2009/7/1 Max Williams <toastkid.williams at gmail.com>

> Hi Julian
> We use the one you linked to (
> http://jquery.bassistance.de/autocomplete/demo/), without any ajax, just
> passing it an array that i populate dynamically when the page loads - like
> this (in an erb file)
>
>    function initializeAutocompletes() {
>      var postcodes = <%= @postcodes.inspect %>;
>      jQuery(".school-postcode-field").autocomplete(postcodes, {
>        minChars: 3,
>        max: 2000,
>        scrollHeight: 500,
>        matchContains: true
>      });
>
> I don't understand what you mean by "Trouble is they don't seem to think of
> the functionality of just replacing
> an existing dropdown." though, can you give an example?
>
> max
>
>
>
> 2009/7/1 Julian Blundell <old at w34u.com>
>
> > Hi
> >
> > I have a html select list that needs to be changed to an auto-complete
> type
> > like the windows selection stuff
> >
> > Is there a jquery plugin which does this, preferably not by using megga
> > ajaxy type stuff, the data is already there after all.
> >
> > Using this at the moment http://nihilex.com/droplist-filter
> > but the client wants it to be more like
> > http://jquery.bassistance.de/autocomplete/demo/
> >
> > Trouble is the don't seem to think of the functionality of just replacing
> > and existing dropdown.
> >
> > Can anybody help?
> >
> > Jules
> > --
> >
> > BNM Subscribe/Unsubscribe:
> > http://www.brightonnewmedia.org/options/bnmlist
> >
> > BNM powered by Wessex Networks:
> > http://www.wessexnetworks.com
> >
> --
>
> BNM Subscribe/Unsubscribe:
> http://www.brightonnewmedia.org/options/bnmlist
>
> BNM powered by Wessex Networks:
> http://www.wessexnetworks.com
>


More information about the BNMlist mailing list. Powered by Wessex Networks