Annotation of todotxt/Text-Todo-REST-API/example/htdocs/index.html, Revision 1.3
1.2 andrew 1: <html><head>
2: <title>todo.txt - javascript client</title>
1.3 ! andrew 3: <link rel="stylesheet" href="todo.css">
1.2 andrew 4: <script src="prototype.js" type="text/javascript"></script>
5: <script type='text/javascript'>
6: function getFiles() {
7: document.getElementById('files').innerHTML = "Getting Files . . .";
1.3 ! andrew 8: new Ajax.Request('/~andrew/user-bin/todo.cgi/.txt', {
1.2 andrew 9: method: 'get',
10: onSuccess: function(response) {
11: document.getElementById('files').innerHTML = response.responseText;
12: }
13: });
14: }
15: function getList(list) {
16: document.getElementById('list').innerHTML = "Getting List . . .";
1.3 ! andrew 17: new Ajax.Updater('list', '/~andrew/user-bin/todo.cgi/' + list + '.txt', {
1.2 andrew 18: method: 'get',
19: });
20: }
21: function getEntry(list, entry) {
22: document.getElementById('entry').innerHTML = "Getting Entry . . .";
1.3 ! andrew 23: new Ajax.Request('/~andrew/user-bin/todo.cgi/' + list + '/entry/' + entry + '.md5', {
1.2 andrew 24: method: 'get',
25: onSuccess: function(response) {
26: document.getElementById('entry').innerHTML =
27: '<pre>' + response.responseText + '</pre>';
28: }
29: });
30: }
31: </script>
32: </head>
33: <body onLoad="getFiles();getList('todo');getEntry('todo',5)">
1.3 ! andrew 34: <!-- $AFresh1: index.html,v 1.2 2010/01/18 04:51:15 andrew Exp $ -->
1.2 andrew 35: <div id='files'></div>
1.3 ! andrew 36: <pre><div id='list'></div></pre>
1.2 andrew 37: <div id='entry'></div>
1.1 andrew 38: </body></html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>