diff --git a/client/index.html b/client/index.html index 3ac13a0..a46efa6 100644 --- a/client/index.html +++ b/client/index.html @@ -102,7 +102,6 @@ - diff --git a/client/projection.js b/client/projection.js index afec5c4..7707f1c 100644 --- a/client/projection.js +++ b/client/projection.js @@ -210,12 +210,37 @@ function onQuery() { } $(document).ready(function() { - for (var keyword in DATA_KEYWORDS) { - $('#query').append($('', { - 'value': keyword, - 'text': keyword - })); - } + // $.ajax({ + // url: 'http://localhost:3000/hscd/keywords', + // type: 'POST', + // contentType: "application/json; charset=utf-8", + // dataType: 'script', + // data: {'foo': 'bar'}, + // error: function() { alert('Failed'); }, + // success: function(data) { alert(typeof(data)); } + // }); - $('#search').click(onQuery); + // $.post("http://localhost:3000/hscd/keywords", {}, function(result){ alert(result);}, "json"); + + // $.ajax({ + // url: 'http://twitter.com/status/user_timeline/padraicb.json?count=10', + // dataType: 'script', + // success: function(data) { alert(data); } + // }); + + $.getJSON('http://localhost:3000/hscd/keywords?callback=?', {'foo': 1}, function(data) { + alert('Data returned ' + Object.keys(data)); + }); + + // for (var keyword in data) { + // $('#query').append($('', { + // 'value': keyword, + // 'text': keyword + // })); + // } + + // $('#search').click(onQuery); + // }).fail(function(d, textStatus, error) { + // console.error("getJSON failed, status: " + textStatus + ", error: "+error) + // }); }); diff --git a/server/server.js b/server/server.js index a0b623c..68971e4 100755 --- a/server/server.js +++ b/server/server.js @@ -9,6 +9,7 @@ function main() { var router = express.Router(); router.use('/keywords', function(req, res, next) { + console.log('Requesting keywords'); res.json(keywords); });