|
Title: combobox select, how to fire a AJAX call to pass a value to php Post by: WillySis on June 02, 2015, 12:55:00 AM I'm a newbee to EasyUI but it looks great and it has many cool features.
I have a combobox which should fire a AJAX call when a new selection is made. The code is working with a native combobox (onchange), but I cant get it work properly with a EasyUI combobox. The combobox is filled from a database with id's and a corresponding text. If there is a value in the database the corresponding field will be selected by default.This is all done in PHP. Nothing complicated here. When the user selects another item it's id has to be sent to the server. This has to be done in AJAX. For a combobox with both name and id set to owner_org I setup a jquery AJAX script: Code: $(document).ready(function() {This schould post two variables ("sv", set to "owner_org" and "choice", which shoul be set to the value (id) of the selected item). This should fire a php script "php/combobox_choice.php' : Code: <?php All the code works with native comboboxes (the AJAX call is then "change" instead of "select". Can somebody please help me out. Title: Re: combobox select, how to fire a AJAX call to pass a value to php Post by: stworthy on June 02, 2015, 07:04:31 PM If you are using the combobox component, please use the 'onChange' event instead.
Code: $('#owner_org').combobox({ |