1 <?xml version=
"1.0" encoding=
"UTF-8"?>
3 PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
4 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
6 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en">
9 <title>WebKell: Your solution to simple online bookkeeping
</title>
11 <style type=
"text/css">
14 /* font-family: Andale Mono, monospace; */
15 font-family: cursive, monospace;
20 font-family: Palatino, serif;
21 /*font-style: normal; */
28 font-family: Palatino, sans-serif;
29 /*font-style: normal; */
38 border-color: #CCCCCC;
47 <script type=
"text/javascript" >
51 function testXMLHttpSubmit() {
53 var accXML =
"create ( <account xmlns='com/interrupt/bookkeeping/account' type='asset' id='create' name='modified expeses' counterWeight='debit'/> );";
54 var dbtXML =
"create ( <debit xmlns='com/interrupt/bookkeeping/account' id='abc' amount='10.00' entryid='e1' accountid='1' currency='CDN' /> );";
56 var bproxy = new BkellProxy();
57 var ahandler = function() {
59 if( (this.xmlhttp.readyState ==
4) && (this.xmlhttp.status ==
200) ) {
61 var rxml = this.xmlhttp.responseXML;
62 var fc = rxml.firstChild;
64 var rpane = document.getElementById(
"resultPane");
65 rpane.value = this.xmlhttp.responseText;
69 var dhandler = function() {
71 //alert(
"dhandler CALLED");
72 if(this.readyState ==
4) {
74 if(this.status ==
200) {
75 alert(
"debit handled");
82 bproxy.parse(accXML,ahandler);
83 //bproxy.parse(dbtXML,dhandler);
88 function xmlHttpSubmit() {
90 var bkexprObj = document.getElementById(
"bkexpr");
91 //alert(bkexprObj.value);
93 var bproxy = new BkellProxy();
94 var bkhandler = function() {
97 if( (this.xmlhttp.readyState ==
4) && (this.xmlhttp.status ==
200) ) {
99 var rxml = this.xmlhttp.responseXML;
100 var fc = rxml.firstChild;
102 //alert( document.getElementById(
"resultPane") );
104 var rpane = document.getElementById(
"resultPane");
105 rpane.value = this.xmlhttp.responseText;
110 bproxy.parse(bkexprObj.value,bkhandler);
113 function xmlHttpSubmitAuthenticate() {
115 var bkexprObj = document.getElementById(
"bkexpr");
117 var bproxy = new BkellProxy();
118 var bkhandler = function() {
121 if( (this.xmlhttp.readyState ==
4) && (this.xmlhttp.status ==
200) ) {
123 var rxml = this.xmlhttp.responseXML;
124 var fc = rxml.firstChild;
126 var rpane = document.getElementById(
"resultPane");
127 rpane.value = this.xmlhttp.responseText;
131 bproxy.addUser(bkexprObj.value,bkhandler);
134 BkellProxy = function() {}
135 BkellProxy.prototype.parse = function(bkexpr, handler) {
137 this.xmlhttp = new XMLHttpRequest();
138 handler.xmlhttp = this.xmlhttp;
140 this.xmlhttp.open(
"POST",
"/webkell/webkell",true);
141 this.xmlhttp.setRequestHeader(
"Content-Type",
142 "application/x-www-form-urlencoded");
143 this.xmlhttp.onreadystatechange = handler;
145 this.xmlhttp.send(
"bkexpr="+ bkexpr );
148 BkellProxy.prototype.addUser = function(bkexpr, handler) {
150 this.xmlhttp = new XMLHttpRequest();
151 handler.xmlhttp = this.xmlhttp;
153 this.xmlhttp.open(
"POST",
"/webkell/authenticate",true);
154 this.xmlhttp.setRequestHeader(
"Content-Type",
155 "application/x-www-form-urlencoded");
156 this.xmlhttp.onreadystatechange = handler;
158 this.xmlhttp.send(
"bkexpr="+ bkexpr );
173 <div id=
"title" style=
" position:relative; top:15px; left:30px; width:70%; " >
174 web
<xx class='coolk'
>K
</xx>ell
175 <xx class='subheader'
>Your solution to simple
<xx style=
"color:#000000">online bookkeeping
</xx> </xx>
177 <div class=
"subheader" style=
"width: 30%;">
183 <form name=
"mainform" id=
"mainform" action=
"/webkell/webkell" method=
"POST" >
186 <div id=
"resultsPane" >
187 <textarea id=
"resultPane" name=
"result" cols=
"90" rows=
"6" />
192 <textarea id=
"bkexpr" name=
"bkexpr" cols=
"90" rows=
"10" />
198 <!-- buttons to send / clear -->
199 <input type=
"button" value=
"send" onclick=
"javascript:xmlHttpSubmit();" />
200 <input type=
"button" value=
"send authenticated" onclick=
"javascript:xmlHttpSubmitAuthenticate();" />
201 <input type=
"reset" value=
"clear" />
213 WebKell (
2007)
<a href=
"http://frye.blogs.com" >Timothy Washington
</a>