Open msoffen opened 7 years ago
I answered my own question...
' var bobo; var bo = $(function(){ bobo = $('#businessowner').magicSuggest({ allowFreeEntries: true, data: '/get_org.php', // Simple query to return the Org Data. method: 'post', required: true, valueField: 'org_id', displayField: 'org_desc' });
$(bobo).on('selectionchange', function(e,m){
$.get('/secure/updateValues.php', 'uid=$uid&businessOwner='+bobo.getValue(), function(){
alert(JSON.stringify(bobo.getValue()));
})
});
});
'
This now correctly is triggered when I change the select box.
The only odd behavior i find is that if you enter text (a valid entry from the pulldown) it stores the text (not the ID that is selected when you click on the text as you type.
I have a page whith 3 magicSuggest widgets on it. One for 3 different business groups.
The Groups are identical (but need to be tracked as Business Owner, Point of Contact, IT Contact...
I'll focus on just one of them (Business Owner)...
I have this jquery code... I know the /get_org.php is returning the correct data (for the value/display fields and the data DOES display properly)...
var bo = $(function(){ $('#businessowner').magicSuggest({ allowFreeEntries: true, data: '/get_org.php', // Simple query to return the Org Data. method: 'post', required: true, valueField: 'org_id', displayField: 'org_desc' }); });
And the HTML for this is: `