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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:42:23+00:00 2026-06-13T20:42:23+00:00

Hope someone can help me. I’m having a lot of problems getting the JQuery

  • 0

Hope someone can help me. I’m having a lot of problems getting the JQuery Autocomplete widget to work correctly in Zend Framework. I’ve managed to get the autocomplete to display and popup a list of items when I start typing, but when I select an option from the popup list, the value of the autocomplete does not change to the item I selected, rather it changes to the text I actually entered from the keyboard. I’m sure I’m probably doing something stupid but I can’t seem to figure it out. Any help will be appreciated.

The autocomplete is created in the form as follows

    $partner_name = new ZendX_JQuery_Form_Element_AutoComplete('unit_name', array(
        'label'     => 'Partner Name:',
        'required'  => true,
    ));      
    $partner_name->setRequired(true)
         ->addValidator("NotEmpty", true, 
                 array('messages'=>'The Partner Name field cannot be empty'));
    $partner_name->setJQueryParam('data',  array_values($partner_options));

    $partner_name->setDecorators(array('UiWidgetElement', 'Errors'));
    $this->addElement($partner_name);

with $partner_options a doctrine result-set and the form is then displayed in a viewscript decorator. This works fine and as I said, displays the list when I start entering values. In my view I have some dojo javascript that executes on the change event for the automplete element as follows:

<script type="text/javascript" src="<?= $this->baseUrl('/js/dojo-release-1.7.2/dojo/dojo.js')?>"
          data-dojo-config="async: true, parseOnLoad:true"></script>
  <script>
    require(["dijit/registry", "dijit/Dialog"], function (registry, dom)
    {

        dojo.connect(dojo.byId('unit_name'), "change", function(evt) {
            alert(dojo.byId('unit_name').value);
        });

    });
</script>

As you can see, the script connects the change event to a function that displays an alert box with the automplete elements value. The problem is that the value it displays is always the letters I type in and not the value I select from the list.

BTW, the same thing happens when I use JQuery javascript as well as when I use the JQuery UI widget directly in my view.

Really confused. Any help will be appreciated. Thank you

  • 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-13T20:42:25+00:00Added an answer on June 13, 2026 at 8:42 pm

    You should investigate Jquery autocomplete!

    $( "#selector" ).bind( "autocompletechange", function(event, ui) {
      ...Then perform all required actions
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having a JQuery/ASP issue that I hope someone can help me with.
Hope someone can help me here? Having an issue getting text that's located inside
Hope someone can help me out with this problem I am having. I just
I hope someone can help me here. I'm having trouble loading this variable. Right
I hope someone can help here, we're having an incredibly annoying time with Visual
I hope someone can help me with this. I am having some trouble figuring
hope someone can help. I have two tables: Users -UserID -UserName UsersType -UserTypeID -UserID
Hope someone can help i cant seem to get my head around this, i
I hope someone can help me with this, as I'm unable to find the
I hope someone can help, I am trying to enable enable ASP.Net Impersonation under

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.