Added Prototype version #6

wants to merge 3 commits into


None yet
4 participants

Support the Prototype javascript framework.

Please also be aware that we have released an ajax-chosen-rails gem for use with Rails 3.1 applications.
This gem has been released with the prototype version included.


meltingice commented Jan 6, 2012

I'm a bit confused by this. Where is the Chosen class that is being extended by ajaxChosen? Is that a part of the ajax-chosen-rails gem?


The Chosen class is just the original chosen javascript library. In the prototype version of chosen, you call

new Chosen(element);

So the prototype version of ajaxChosen wraps the Chosen object, but binds to the 'keyup' event on the input after chosen is initialized. You call it like this:

new ajaxChosen(element);

I'll update the README with this info too, sorry, I should have added that to the pull request

+ # I'm assuming that it's ok to use the parameter name `term` to send
+ # the form value during the ajax call. Change if absolutely needed.
+ query_key = options.query_key || "term"

ndbroadbent Jan 7, 2012

We did need to change the parameter name, so we made this configurable via a query_key option.

Do you think this ok? If so, I'll add it to the jQuery version and also fix the comment above

@meltingice What is the status of this PR? Can this be merged? Seems like a great addition.

evilguc commented Apr 23, 2013

Too many bugs to use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment