You need to sign in to do that
Don't have an account?
URGENT: EasyAutocomplete do not work with remote data
EasyAutocomplete plugin works well as long as I pass the data directly but it do not work when we load the data via remote method. I am using this in visualforce page. Below is the error I get in console. Please help!!
WARNING: Fail to load response data.
WARNING: Fail to load response data.
<script> var options = { data: function(phrase) { var str = '[{"name": "Afghanistan", "code": "AF"}, {"name": "Aland Islands", "code": "AX"}]'; var obj = JSON.parse(str); return obj ; }, getValue: function(element) { return element.name; }, ajaxSettings: { dataType: "json", method: "POST", data: { dataType: "json" } }, preparePostData: function(data) { data.phrase = $("#inputId").val(); return data; }, requestDelay: 400 }; $("#inputId").easyAutocomplete(options); </script>