Bug Tracker

Modify

Ticket #4738 (closed enhancement: invalid)

Opened 4 years ago

Last modified 4 years ago

[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:
Blocking: Blocked by:

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

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

Change History

Changed 4 years ago by dfd

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

Changed 4 years ago by dfd

My modified jquery.autocomplete.js file.

comment:1 Changed 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

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 .

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.