version 1.4, 2010/01/31 02:31:47 |
version 1.6, 2010/01/31 03:40:21 |
|
|
<html><head> |
<html><head> |
|
<!-- $AFresh1: index.html,v 1.5 2010/01/31 03:12:02 andrew Exp $ --> |
<title>todo.txt - ajax client</title> |
<title>todo.txt - ajax client</title> |
<link rel="stylesheet" href="todo.css"> |
<link rel="stylesheet" href="todo.css"> |
<script src="http://o.aolcdn.com/dojo/1.4/dojo/dojo.xd.js"></script> |
<!-- <script src="http://o.aolcdn.com/dojo/1.4/dojo/dojo.xd.js"></script> --> |
|
<script src="dojo/1.4/dojo/dojo.xd.js"></script> |
<script type='text/javascript'> |
<script type='text/javascript'> |
var base_url = '/~andrew/user-bin/todo.cgi'; |
var base_url = '/~andrew/user-bin/todo.cgi'; |
|
|
function loadIntoNode(data, xhr){ |
function loadIntoNode(data, xhr){ |
if(xhr.args.node){ |
if(xhr.args.node){ |
xhr.args.node.innerHTML = data; |
xhr.args.node.innerHTML = data; |
} |
|
} |
} |
|
} |
|
|
function getFiles() { |
function getFiles() { |
dojo.byId('files').innerHTML = "Getting Files . . ."; |
dojo.byId('files').innerHTML = "Getting Files . . ."; |
dojo.xhrGet({ |
dojo.xhrGet({ |
|
|
}); |
}); |
} |
} |
function getEntry(list, entry) { |
function getEntry(list, entry) { |
document.getElementById('entry').innerHTML = "Getting Entry . . ."; |
document.getElementById('entry').innerHTML = "Getting Entry . . ."; |
dojo.xhrGet({ |
dojo.xhrGet({ |
url: base_url + '/' + list + '/entry/' + entry + '.md5', |
url: base_url + '/' + list + '/' + entry + '.md5', |
node: dojo.byId("entry"), |
node: dojo.byId("entry"), |
load: loadIntoNode |
load: loadIntoNode |
}); |
}); |
} |
} |
</script> |
</script> |
</head> |
</head> |
<body onLoad="getFiles();getList('todo');getEntry('todo',5)"> |
|
|
|
<!-- $AFresh1: index.html,v 1.3 2010/01/19 03:33:13 andrew Exp $ --> |
<body onLoad="getFiles();getList('todo');getEntry('todo',5)"> |
<div id='files'></div> |
<div id='files'></div> |
<pre><div id='list'></div></pre> |
|
<div id='entry'></div> |
<div id='entry'></div> |
|
<pre><div id='list'></div></pre> |
</body></html> |
</body></html> |