-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview.html
More file actions
40 lines (28 loc) · 1.14 KB
/
view.html
File metadata and controls
40 lines (28 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>view</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
</head>
<body>
<p><a href="index.html">Back</a></p>
<hr/>
<script type="text/javascript">
$(document).ready(function() {
$.getJSON('results.php', function(data) {
var items = [];
var map_url = "http://fkh.cartodb.com/tables/bkblocks/embed_map?title=true&description=false&search=false&shareable=false&sql=SELECT%20bkblocks.cartodb_id%2C%20bkblocks.the_geom_webmercator%2C%20names.neighborhood%20FROM%20bkblocks%2C%20names%20where%20bkblocks.block%20%3D%20names.block%20and%20names.neighborhood%20LIKE%20'%25"
$.each(data.rows, function(key, val) {
items.push('<li id="' + key + '"><a href="' + map_url + val.neighborhood + '%25\'">'+ val.neighborhood + '</a></li>');
});
$('<ul/>', {
'class': 'places',
html: items.join('')
}).appendTo('body');
});
});
</script>
</body>
</html>