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

Diff for /todotxt/Text-Todo-REST-API/example/htdocs/index.html between version 1.3 and 1.4

version 1.3, 2010/01/19 03:33:13 version 1.4, 2010/01/31 02:31:47
Line 1 
Line 1 
 <html><head>  <html><head>
 <title>todo.txt - javascript client</title>  <title>todo.txt - ajax client</title>
 <link rel="stylesheet" href="todo.css">  <link rel="stylesheet" href="todo.css">
 <script src="prototype.js" type="text/javascript"></script>  <script src="http://o.aolcdn.com/dojo/1.4/dojo/dojo.xd.js"></script>
 <script type='text/javascript'>  <script type='text/javascript'>
   var base_url = '/~andrew/user-bin/todo.cgi';
   
     function loadIntoNode(data, xhr){
       if(xhr.args.node){
         xhr.args.node.innerHTML = data;
       }
     }
 function getFiles() {  function getFiles() {
         document.getElementById('files').innerHTML = "Getting Files . . .";    dojo.byId('files').innerHTML = "Getting Files . . .";
         new Ajax.Request('/~andrew/user-bin/todo.cgi/.txt', {    dojo.xhrGet({
                 method: 'get',      url: base_url,
                 onSuccess: function(response) {      node: dojo.byId("files"),
                          document.getElementById('files').innerHTML = response.responseText;      load: loadIntoNode
                 }    });
         });  
 }  }
 function getList(list) {  function getList(list) {
         document.getElementById('list').innerHTML = "Getting List . . .";    dojo.byId('list').innerHTML = "Getting List . . .";
         new Ajax.Updater('list', '/~andrew/user-bin/todo.cgi/' + list + '.txt', {    dojo.xhrGet({
                 method: 'get',      url: base_url + '/' + list + '.txt',
         });      node: dojo.byId("list"),
       load: loadIntoNode
     });
 }  }
 function getEntry(list, entry) {  function getEntry(list, entry) {
         document.getElementById('entry').innerHTML = "Getting Entry . . .";          document.getElementById('entry').innerHTML = "Getting Entry . . .";
         new Ajax.Request('/~andrew/user-bin/todo.cgi/' + list + '/entry/' + entry + '.md5', {    dojo.xhrGet({
                 method: 'get',      url: base_url + '/' + list + '/entry/' + entry + '.md5',
                 onSuccess: function(response) {      node: dojo.byId("entry"),
                          document.getElementById('entry').innerHTML =      load: loadIntoNode
                         '<pre>' + response.responseText + '</pre>';    });
                 }  
         });  
 }  }
 </script>  </script>
 </head>  </head>
 <body onLoad="getFiles();getList('todo');getEntry('todo',5)">  <body onLoad="getFiles();getList('todo');getEntry('todo',5)">
 <!-- $AFresh1: index.html,v 1.2 2010/01/18 04:51:15 andrew Exp $ -->  
   <!-- $AFresh1: index.html,v 1.3 2010/01/19 03:33:13 andrew Exp $ -->
 <div id='files'></div>  <div id='files'></div>
 <pre><div id='list'></div></pre>  <pre><div id='list'></div></pre>
 <div id='entry'></div>  <div id='entry'></div>

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

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