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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:21:24+00:00 2026-06-09T04:21:24+00:00

I have written an autocomplete function. When I click on #input3 it starts to

  • 0

I have written an autocomplete function.
When I click on #input3 it starts to generate what I have typed.

Example: “apple” I type “app” and I click to select “apple”. What I select should be sent to the src and updated in #input2.

Problem: What is sent to the src is what I have typed and not what I have selected. Why?

.autocomplete({
    source: function(request, response) {
        $.ajax({
            url: src,
            fillin:true,
            dataType: "json",
            data: {
                term : request.term,
                c3 : $("#input3").val()
                },
            success: function(data){
                response(data)
                }
            });
        },
    minLength: 0,
    delay: 300
    })
.change(function(request2, response) {
    $.ajax({
        url: src,
        dataType: "json",
        data: {
            term : request2.term,
            c1 : "search",
            c3: $("#input3").val()
            },
        success: function(data){
            $("#input2").val(data);
            }
        });
    })
  • 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-09T04:21:25+00:00Added an answer on June 9, 2026 at 4:21 am

    I have solve it. I add the cod after .autocomplete

            focus: function(event, ui) {
                $("#txtBufferTwo").val(ui.item.value);
                event.preventDefault();
                },
    

    Follow by a hidden field.

    What I did was once selection was click, the value is assign to the hidden field and submit the value of the hidden field.
    If there is any better methods feel free to post here

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

Sidebar

Related Questions

I have written a function that sorts a big scale of data. To test
I have written a function that extract the domain from hostname. e.g. www.domain.com ->
I have written the following code. I know that a higher order function is
I have written an Android app (target 3.2) using Eclipse 3.7, I tried to
I have written two queries. query 1: select stock_id from_id, nvl(lead(stock_id, 1, null) over
I have written a function for browser compatibility. When I pass objTR.cells[0] it works
I have written a app in PHP on my localhost server using XAMP, which
I have written the following function using sqlalchemy (my underlying db is PostgreSQL 8.4).
I have written the following code to generate pdf and the pdf i generated
I've using git on mac and I have configured autocompletion as written at http://www.codethatmatters.com/2010/01/git-autocomplete-in-mac-os-x/

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.