Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6343779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:30:43+00:00 2026-05-24T20:30:43+00:00

hi i am using Ajax AutoComplete for jQuery in my jquery i am using

  • 0

hi i am using Ajax AutoComplete for jQuery

in my jquery i am using

        options = { serviceUrl: "<? echo $this->config->item('base_url'); ?>index.php/welcome/autocomplete" };    
        a = $('#query').autocomplete(options);

i saw that i can pass extra parameters like

var a = $('#query').autocomplete({ 
    serviceUrl:'service/autocomplete.ashx',
    minChars:2, 
    delimiter: /(,|;)\s*/, // regex or character
    maxHeight:400,
    width:300,
    zIndex: 9999,
    deferRequestBy: 0, //miliseconds
    params: { country:'Yes' }, //aditional parameters
    noCache: false, //default is false, set to true to disable caching
    // callback function:
    onSelect: function(value, data){ alert('You selected: ' + value + ', ' + data); },
    // local autosugest options:
    lookup: ['January', 'February', 'March', 'April', 'May'] //local lookup values 
  });

so i want to create n new parameter and pass it like this

         var a = $('#query2').autocomplete({ 
             serviceUrl: "<? echo $this->config->item('base_url'); ?>index.php/welcome/autocomplete",
             id:'query2'
            });

How can i access that extra parameter from the autocomplete code ?? i want to add that id to my

.autocomplete-w1

initially it looks like this

<div class="autocomplete-w1"></div>

i want to change it to

 <div id="jquery2" class="autocomplete-w1"></div>

please help…………………………..

UPDATE

i tried to adding my id parameter to this function

  function Autocomplete(el, options) {
    this.el = $(el);
    this.el.attr('autocomplete', 'off');
    this.suggestions = [];
    this.data = [];
    this.badQueries = [];
    this.selectedIndex = -1;
    this.currentValue = this.el.val();
    this.intervalId = 0;
    this.cachedResponse = [];
    this.onChangeInterval = null;
    this.ignoreValueChange = false;
    this.serviceUrl = options.serviceUrl;
    this.isLocal = false;
    this.options = {
      autoSubmit: false,
      minChars: 1,
      maxHeight: 300,
      deferRequestBy: 0,
      width: 0,
      highlight: true,
      params: {},
      fnFormatResult: fnFormatResult,
      delimiter: null,
      zIndex: 9999,
      id:'test'
    };
    this.initialize();
    this.setOptions(options);
  }

i gave a default value test . when i alert $this.options.id i always getting 'test' the value i passig jquery2 is not getting . what is the problem there ????

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T20:30:44+00:00Added an answer on May 24, 2026 at 8:30 pm

    hmmm. i have solved it .

    i added extra parameter id

            a = $('#query').autocomplete({
                                            serviceUrl: "<? echo $this->config->item('base_url'); ?>index.php/welcome/autocomplete",
                                            id: 'query'
                                        });
    

    in my jquery.autocomplete.js in

     function Autocomplete(el, options) {
    

    i get that parameter like

      this.id = options.id;
    

    now i can add it to div’s id

    <div class="autocomplete-w1" id='+this.id+'></div>
    

    thanks……………….. 🙂 🙂 😀

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a JQuery autocomplete AJAX plugin as follows; $(document).ready(function() { $(#myfield).autocomplete({ serviceUrl:'autocomplete.asp?soc='
What's benefit using jQuery Autocomplete over Ajax AutoCompleteExtender? Can some one explains the benefits
I'm using the jQuery Autocomplete control to autocomplete from the server via an AJAX
I'm using the jQuery AutoComplete plugin combined with ajax. Do you know how can
i have an input using the jquery autocomplete plugin. with this i want to
I'm using django-ajax-selects , which is a freely available django app providing jquery autocomplete
hi i am using ajax autocomplete for jquery plugin http://www.devbridge.com/projects/autocomplete/jquery/ there is a code
I'm using jquery autocomplete <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script> <script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js'></script> Everything is working Ok., but now
hi i am using Ajax AutoComplete for jQuery library http://www.devbridge.com/projects/autocomplete/jquery/ there are 2 demos
I'm referencing the jQuery autocomplete plugin code seen in this tutorial: http://net.tutsplus.com/tutorials/javascript-ajax/how-to-use-the-jquery-ui-autocomplete-widget/ The problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.