Bug Tracker

Opened 9 years ago

Closed 9 years ago

#4738 closed enhancement (invalid)

[autocomplete] Added configuration option for query parameter name.

Reported by: dfd Owned by:
Priority: minor Milestone: 1.4
Component: unfiled Version: 1.3.2
Keywords: autocomplete plugin Cc:
Blocked by: Blocking:

Description

I needed this, so I added a few small changes to make it work. The plugin works the same as before, with 'q' as the default name of the search query variable passed to the server-side script, but I added a parameter that can be passed in as an option called 'queryParamName.'

So, for example, if I wanted to have my query param to be called 'title' vs. 'q,' I could change this like so:

$("input#document_title").autocomplete('/documents.js', { queryParamName: 'title'});

That's all there is to it. I'd love to get this included in the plugin if possible, and of course I'm not set on any of the naming conventions or coding style, I just want the functionality.

The diff I'm attaching is to version 1.0.2 I believe, as that's the last version mentioned in the changelog from the zip file I downloaded here: http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/.

Thanks!

Best, Dave

Attachments (2)

queryParamName.diff (364 bytes) - added by dfd 9 years ago.
Simple diff file of original (v1.0.2 I believe) jquery.autocomplete.js and my updated version
jquery.autocomplete.js (19.5 KB) - added by dfd 9 years ago.
My modified jquery.autocomplete.js file.

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by dfd

Attachment: queryParamName.diff added

Simple diff file of original (v1.0.2 I believe) jquery.autocomplete.js and my updated version

Changed 9 years ago by dfd

Attachment: jquery.autocomplete.js added

My modified jquery.autocomplete.js file.

comment:1 Changed 9 years ago by dmethvin

Resolution: invalid
Status: newclosed

This is not a jQuery core bug. Please use the jQuery forums or contact the author via the method they request. For jQuery UI plugins, please file a bug on http://dev.jqueryui.com .

Note: See TracTickets for help on using tickets.