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 8628957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:41:08+00:00 2026-06-12T08:41:08+00:00

I am using jQuery autocomplete and its working fine, now I want to store

  • 0

I am using jQuery autocomplete and its working fine, now I want to store a variable in session from jQuery when following condition occurs.

When someone types any word jQuery shows suggestion dropdown, if someone select an item from that suggestion dropdown.

I want to capture above point and store a variable in session.

I searched Google, StackOverflow but find no relevant solution. My code for autocomplete is following:

  $(".autosearch-smart").autocomplete('Home/GetCompanyNames', {
    minChars: 1,
    width: 402,
    matchContains: "word",
    autoFill: true
});

and this is what I tried to do:

  $(".autosearch-smart").autocomplete('Home/GetCompanyNames', {
    minChars: 1,
    width: 402,
    matchContains: "word",
    autoFill: true,
    select: function (a, b) {
        alert("selected");
    }

});

EDIT : Select event handler is also not working

I am using asp.net MVC3 with C#. Please help me out and thanks in advance.

  • 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-06-12T08:41:09+00:00Added an answer on June 12, 2026 at 8:41 am

    So if I understand correctly you want to store the selected value in a variable sessions

    you can get the value out of the selected item through following code:

      $(".autosearch-smart").autocomplete('Home/GetCompanyNames', {
    minChars: 1,
    width: 402,
    matchContains: "word",
    autoFill: true,
    select: function (event, ui) {
        var label = ui.item.label;
        var value = ui.item.value;
       //store in session
      document.valueSelectedForAutocomplete = value 
    }
    });
    

    the value and label are json objects that came from the server

    Hope this helps

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

Sidebar

Related Questions

I am using Jquery Autocomplete . Its workng fine but I have small problem.
I am using jquery autocomplete combobox , and its all working great. Visit http://jqueryui.com/demos/autocomplete/#combobox
I'm using jQuery autocomplete plugin from jQuery website calling the controller url which return
I am using jquery.autocomplete.js and jquery.apitags to select a few elements from a div
I'm using jQuery Autocomplete plugin which, generates following markup when suggestions show up. <ul
Im currently using the JQuery UI extension for its search autocomplete. However, I need
I'm using the jQuery Autocomplete plugin from http://docs.jquery.com/Plugins/Autocomplete on IE7 and it's not releasing
i have an input using the jquery autocomplete plugin. with this i want to
I have simple jQuery UI autocomplete, which was working and now it's not. The
I'm trying to build an autocomplete using jQuery plugin autocomplete from this site .

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.