version 1.1, 2010/01/18 04:19:04 |
version 1.2, 2010/01/18 04:51:15 |
|
|
<html><head><title></title></head><body> |
<html><head> |
|
<title>todo.txt - javascript client</title> |
|
<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/andrew.txt', { |
|
method: 'get', |
|
onSuccess: function(response) { |
|
document.getElementById('files').innerHTML = response.responseText; |
|
} |
|
}); |
|
} |
|
function getList(list) { |
|
document.getElementById('list').innerHTML = "Getting List . . ."; |
|
new Ajax.Request('/~andrew/user-bin/todo.cgi/andrew/' + list + '.txt', { |
|
method: 'get', |
|
onSuccess: function(response) { |
|
document.getElementById('list').innerHTML = |
|
'<pre>' + response.responseText + '</pre>'; |
|
} |
|
}); |
|
} |
|
function getEntry(list, entry) { |
|
document.getElementById('entry').innerHTML = "Getting Entry . . ."; |
|
new Ajax.Request('/~andrew/user-bin/todo.cgi/andrew/' + 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$ --> |
|
<div id='files'></div> |
|
<div id='list'></div> |
|
<div id='entry'></div> |
</body></html> |
</body></html> |