Jump to content

Form Select value not updating


jcanker

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.