jstayton/jquery-marcopolo — Issue #12: json validity question
Author: courtritual
Created: 2012-01-21 10:08:59+00:00
State: open

hey, thanks so much for this plugin, it really seems to be a well thought out approach to the autocompletion pattern. i know this isn't support so feel free to delete, however ....

in the documentation, the json reads :
first_name: 'James',
last_name: 'Butler',
profile_url: '/users/78749',

however, i'm pulling my json from a mssql database, giving it a utf-8 header and outputting valid json as

"ID": 1,
"Department": "Assembly",
"Manager": "eh",

is this discrepancy between the json and string handling with quotes the reason why mp is connecting to the url, sending the param but not being sent back any data?

my js:

$('#customer').marcoPolo({
url: '../modules/quality-control-dependencies/quality-control-live-search-departments.php',
formatItem: function (data, $item) {
return data.department;
},
onSelect: function (data, $item) {
this.val(data.department);
},
minChars: 3
});