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

  • Home
  • SEARCH
  • 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 8817771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:55:56+00:00 2026-06-14T04:55:56+00:00

I want to use the users entered value into the input being affected by

  • 0

I want to use the users entered value into the input being affected by autocomplete’s widget, hope the following is self-explanatory of what I want to achieve:

source: $(this).val()

I think $(this).val() won’t work because source expects an object?

I’m new to JavaScript, thanks.

$(".myinput").autocomplete({
    source:$(this).val()
});
  • 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-14T04:55:58+00:00Added an answer on June 14, 2026 at 4:55 am

    I think you are using the source argument incorrectly for jQuery UI’s autocomplete. $(this).val() will get the current value out of the $(this) DOM object (assuming that’s what it’s pointing to).

    Instead the source argument is supposed to be pointing to a source of possible completions for the input. As an example from the jQuery UI website

    $(function() {
        var availableTags = ["ActionScript", "AppleScript", "Asp", "BASIC",
            "C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang"];
        $( "#tags" ).autocomplete({
            source: availableTags
        });
    });
    

    As you can see from this example, source points to an array of possible tag values that will be autocompleted when the user starts typing.

    To address my new understanding of the OP’s question:

    To add the user’s current entry into the autocomplete, you could use code like the following:

    $( "#tags" ).autocomplete("option","source",
        availableTags.concat($("#tags").val()));
    

    This would need to be called every time the input changes (using the keypress event might be helpful for this.)

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

Sidebar

Related Questions

i want to format number entered by user in dutch format. ie. use decimal
I want to use the Login Tool from the VS Toolbox to login users
Hay guys, i want to use something like this users = User.objects.all() but i
I want to write a simple chat application (for test use). The users and
When users go on my website, I want to force them to use Internet
I have an input field on my PHP page. When a value is entered
I want to use a user inputed name in the form of an NSString
My projects uses ARC and I want to use GDATA api which is not
I want to use jquery draggable/droppable to let the user select a group of
I want to use Context.Items to store some info of a User Control like:

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.