Skip to main content

Bug Tracker

Side navigation

#4738 closed enhancement (invalid)

Opened June 08, 2009 03:47PM UTC

Closed October 13, 2009 01:19AM UTC

[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)
  • jquery.autocomplete.js (19.5 KB) - added by dfd June 08, 2009 03:54PM UTC.

    My modified jquery.autocomplete.js file.

  • queryParamName.diff (0.4 KB) - added by dfd June 08, 2009 03:48PM UTC.

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

Change History (1)

Changed October 13, 2009 01:19AM UTC by dmethvin comment:1

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 .