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

Annotation of todotxt/Text-Todo-REST-API/example/htdocs/index.html, Revision 1.4

1.2       andrew      1: <html><head>
1.4     ! andrew      2: <title>todo.txt - ajax client</title>
1.3       andrew      3: <link rel="stylesheet" href="todo.css">
1.4     ! andrew      4: <script src="http://o.aolcdn.com/dojo/1.4/dojo/dojo.xd.js"></script>
1.2       andrew      5: <script type='text/javascript'>
1.4     ! andrew      6: var base_url = '/~andrew/user-bin/todo.cgi';
        !             7:
        !             8:   function loadIntoNode(data, xhr){
        !             9:     if(xhr.args.node){
        !            10:       xhr.args.node.innerHTML = data;
        !            11:     }
        !            12:   }
1.2       andrew     13: function getFiles() {
1.4     ! andrew     14:   dojo.byId('files').innerHTML = "Getting Files . . .";
        !            15:   dojo.xhrGet({
        !            16:     url: base_url,
        !            17:     node: dojo.byId("files"),
        !            18:     load: loadIntoNode
        !            19:   });
        !            20:
1.2       andrew     21: }
                     22: function getList(list) {
1.4     ! andrew     23:   dojo.byId('list').innerHTML = "Getting List . . .";
        !            24:   dojo.xhrGet({
        !            25:     url: base_url + '/' + list + '.txt',
        !            26:     node: dojo.byId("list"),
        !            27:     load: loadIntoNode
        !            28:   });
1.2       andrew     29: }
                     30: function getEntry(list, entry) {
                     31:        document.getElementById('entry').innerHTML = "Getting Entry . . .";
1.4     ! andrew     32:   dojo.xhrGet({
        !            33:     url: base_url + '/' + list + '/entry/' + entry + '.md5',
        !            34:     node: dojo.byId("entry"),
        !            35:     load: loadIntoNode
        !            36:   });
1.2       andrew     37: }
                     38: </script>
                     39: </head>
                     40: <body onLoad="getFiles();getList('todo');getEntry('todo',5)">
1.4     ! andrew     41:
        !            42: <!-- $AFresh1: index.html,v 1.3 2010/01/19 03:33:13 andrew Exp $ -->
1.2       andrew     43: <div id='files'></div>
1.3       andrew     44: <pre><div id='list'></div></pre>
1.2       andrew     45: <div id='entry'></div>
1.1       andrew     46: </body></html>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>