Below autocomplete works when source is local, but when source is switched to
local exercise_data.json it cannot seem to import?
exercise_data.json is like:
[
{
"city": "Westerlo",
"name": "David XXX",
"country": "Spain",
"company": "XXX Corporation",
"job_history": [
"Sibelius"
],
"email": "[email protected]"
},
{
"city": "Osgoode",
"name": "Madeson XXXX",
"country": "Tokelau",
"company": "Vitae Erat LLC",
"job_history": [
"Chami"
],
"email": "[email protected]"
},
]
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>jQuery UI Autocomplete functionality</title>
<link rel="stylesheet"
href="http://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css"/>
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<!-- Javascript -->
<script>
$(function() {
var availableTutorials = [
"ActionScript",
"Boostrap",
"C",
"C++",
];
$( "#automplete-1" ).autocomplete({
source: availableTutorials
});
});
</script>
</head>
<body>
<!-- HTML -->
<div class="ui-widget">
<p>Type "a" or "s"</p>
<label for="automplete-1">Tags: </label>
<input id="automplete-1">
</div>
</body>
</html>
So how to modify the autocomplete to read in local json data, and where should
I place the exercise_data.json in my Flask project?
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pocoo-libs.
For more options, visit https://groups.google.com/d/optout.