Closed matthewstokeley closed 12 years ago
Hey, thanks for the kind words! Means a lot.
Your JSON is actually more valid than the JSON in the documentation, now that I'm looking at it. (I'll fix that.)
If you browse directly to the URL Marco Polo is requesting, do you get data back? Can you post the exact data back here? That'll help in troubleshooting.
Justin
thanks so much for the help Justin.
my bloated url is quality-control-live-search-departments.php?u=Assembly
json:
[{"ID":1,"Department":"Assembly","Manager":"EF"}]
i'm fairly sure mp is connecting to the page, as i'm not getting the error message. thanks again!
Your JSON is valid, but you're using data.department
instead of data.Department
in the callback methods (case-sensitivity is important). Give that try and let me know if it works. Thanks!
Justin
Hey Justin, I did see that after I posted it and changed it, however still no dice. Really appreciate the help though!
Do you have access to developer tools (or Firebug) in the browser you're using? Are you getting any JavaScript warnings/errors? Can you put console.log(data);
in your formatItem
callback and see what's output?
I'm not getting any errors except the character minimum restriction. After three characters, I get an ok get but a null response. Perhaps its the fact that this is hosted on a windows server, even if I am adding json headers via php.
Hmmm, yeah, an empty response is hard to diagnose since there are so many possibilities. I don't think I'll be of much help on that end. Once you do figure it out and start getting the proper JSON response, let me know if you continue to experience problems on the Marco Polo side.
Justin
Thanks so much for your help and for making the best autocomplete plugin bar none. For the sake of anyone looking this over and having the same problem as me, simply renaming the param made it work. Not sure why, but happy it does. Thanks again!
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
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: