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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:20:28+00:00 2026-05-15T14:20:28+00:00

With this code: function setupRow(event, ui) { var textbox, // how do i get

  • 0

With this code:

function setupRow(event, ui) {
        var textbox, // how do i get to the textbox that triggered this? from there
        // on i can find these neighbours:
        hiddenField = textbox.next(), 
        select = textbox.parents('tr').find('select');

        textbox.val(ui.item.Name);
        hiddenField.val(ui.item.Id);
        $.each(ui.item.Uoms, function(i, item){
            select.append($('<option>' + item + '</option>'));
        });             
        return false;
    }
    function setupAutoComplete(){
        var serviceUrl = "/inventory/items/suggest";
        $("input.inputInvItemName").autocomplete({
            source: function(request, response) {
                $.ajax({
                    url: serviceUrl,
                    data: request,
                    dataType: "json",
                    success: function(data) {
                        response($.map(data.InventoryItems, function(item) {
                            return {
                                value: item.Name
                            };
                        }));
                    },
                    select: function(event, ui) {
                        setupRow(event, ui);
                    },
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
                        alert(textStatus);
                    }
                });
            },
            minLength: 3,
            delay: 500
        });
    }

everything seems ok. Problem is the select handler never fires, not even the anonymous function that wraps my original delegate setupRow for debugging purposes is ever called.

anyone can see my error?

I also left a question in the comment: how do I get to the textbox that had the autosuggestion. Cannot use id here, because these text boxes are multiples and generated on the fly, interactively. Or is there another way to do the same thing?

Thanks for any help!

  • 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-15T14:20:29+00:00Added an answer on May 15, 2026 at 2:20 pm

    ok, got a step closer by using

    inputs.bind("autocompleteselect", setupRow);
    

    now setupRow fires.

    Now it seems, that the success callback transforms the data, I get returned.I need to find a way, to both display the right value in the dropdown, without destroying the requests response…

    Any ideas?

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

Sidebar

Ask A Question

Stats

  • Questions 488k
  • Answers 488k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I think you should think carefully about this problem. How… May 16, 2026 at 8:48 am
  • Editorial Team
    Editorial Team added an answer I agree with Thilo that it is not a good… May 16, 2026 at 8:48 am
  • Editorial Team
    Editorial Team added an answer You must pay the $99/year fee to be a registered… May 16, 2026 at 8:48 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Hello I get a weird error in this code: function validateForm(aform) { var s=;
This code function LoadContent(Id) { alert('Controls/Network/NetworkDetail.aspx?' + rnd() + '&CtlId=' + Id); $.get('Controls/Network/NetworkDetail.aspx?' +
View this code: function testprecision(){ var isNotNumber = parseFloat('1.3').toPrecision(6); alert(typeof isNotNumber); //=> string }
Consider this code... $(function() { for (var i = 0; i < 10; i++)
I have this code: function render_message(id) { var xmlHttp; xmlHttp=new XMLHttpRequest(); xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4)
I wrote this code: function get_feed(){ // Get RSS Feed(s) include_once(ABSPATH . WPINC .
I wrote this code: function json() { var url=http://192.172.2.23:8080/geoserver/wfs?request=GetFeature&version=1.1.0&outputFormat=json&typeName=topp:networkcoverage&CQL_FILTER= topp:CELL_ID='410-07-301-31781' Or topp:CELL_ID='nnn'&callback=?; jQuery.getJSON(url,function(data){alert(Symbol: +
I have this code function check(){ $.get(friend.php, { id: friendid }, function(data){ //Do stuff
Say I have this code: function onComplete(event, request, settings) { // How do I
Please, may somebody explain me, what can raise an exception in this code? function

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.