Jump to content

Recommended Posts

I am working on some code that gives the user a choice to use a jquery UI autocomplete widget or a form <select> to choose which customer to pull up.  (Redundant because the mobile browsers aren't playing nice with the UI widget)

 

In theory, if the autocompleter is used, it changes the value of the select.  The select, in turn, has onchange set to run the AJAX that gets the data for the specified customer and return it as XML.

 

THE PROBLEM:  When the autocompleter is used, it properly changes which customer appears selected on the <select> list to match what was selected in the autocomplete; however, a change isn't registering to the point where it recognizes the onchange and runs the AJAX functions.  If I manually select a customer off the select list, it works fine.

 

var selectedObj = ui.item; //this is what's selected in the autocomplete
$("#selectCustomer").val(selectedObj.value); 

 

Why is it changing the select drop menu so I see the change, but doesn't register as a changed value?

Link to comment
https://forums.phpfreaks.com/topic/227608-form-select-value-not-updating/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.