I have a need to fill two input fields using autocomplete. I'd like to pull from of my MySQL table Fname and Lname both in a different column of the table. It seemed to me if I were to concatenate the two fields using CONCAT(Fname, ', ', Lname) as FullName then pass this value back to source of jQuery.
But I don't know what to do from there to split the 'term' value as it returns. Here is what I have. But the return puts both names 'Bill, Smith' for example in both the #Fname and #Lname. I just don't know jQuery well enough yet to figure this out by myself.
On top of that I would like it if the hint would work from either of the two input fields #Fname or #Lname. And break the FullName value into its two parts, filling the appropriate field.
$(document).ready(function () {
$( "#cs1" ).autocomplete({
source: "gethint.php",
autoFocus: true,
focus: function() { return false; }
})
.on( 'autocompleteresponse autocompleteselect', function ( e, ui ) {
On an iPad please go to http://arhab.org/index3.html. Select the 'Records==>Highest' menu item and notice that even after the new page content is displayed the menu list items are still displayed.
To fix this I have tried changing focus after the selection. This didn't work. I also tried to have the javascript select another (invisible) button but this didn't work either. I also tried selecting (tapping) in an empty part of the screen but that didn't work either. The only thing that actually clears the menu dropdown is clicking on another menu item. But then the whole problems starts again on the new selection.
I'd really like this to behave the way it does in Safari/Firefox/I.E./etc. on a computer, anyone know how I can do this?
Thanks in advance for all your past and I'm sure future assistance....