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