[BACK]Return to index.html CVS log [TXT][DIR] Up to [local] / todotxt / Text-Todo-REST-API / example / htdocs

File: [local] / todotxt / Text-Todo-REST-API / example / htdocs / index.html (download) (as text)

Revision 1.3, Tue Jan 19 03:33:13 2010 UTC (14 years, 5 months ago) by andrew
Branch: MAIN
Changes since 1.2: +6 -9 lines

no more per user

<html><head>
<title>todo.txt - javascript client</title>
<link rel="stylesheet" href="todo.css">
<script src="prototype.js" type="text/javascript"></script>
<script type='text/javascript'>
function getFiles() {
	document.getElementById('files').innerHTML = "Getting Files . . .";
	new Ajax.Request('/~andrew/user-bin/todo.cgi/.txt', {
		method: 'get',
  		onSuccess: function(response) {
   			 document.getElementById('files').innerHTML = response.responseText;
  		}
	});
}
function getList(list) {
	document.getElementById('list').innerHTML = "Getting List . . .";
	new Ajax.Updater('list', '/~andrew/user-bin/todo.cgi/' + list + '.txt', {
		method: 'get',
	});
}
function getEntry(list, entry) {
	document.getElementById('entry').innerHTML = "Getting Entry . . .";
	new Ajax.Request('/~andrew/user-bin/todo.cgi/' + list + '/entry/' + entry + '.md5', {
		method: 'get',
  		onSuccess: function(response) {
   			 document.getElementById('entry').innerHTML = 
			'<pre>' + response.responseText + '</pre>';
  		}
	});
}
</script>
</head>
<body onLoad="getFiles();getList('todo');getEntry('todo',5)">
<!-- $AFresh1: index.html,v 1.3 2010/01/19 03:33:13 andrew Exp $ -->
<div id='files'></div>
<pre><div id='list'></div></pre>
<div id='entry'></div>
</body></html>