comparison lib/js/urweb.js @ 613:c5991cdb0c4b

Initial parsing of RPC results
author Adam Chlipala <adamc@hcoop.net>
date Sun, 15 Feb 2009 12:33:41 -0500
parents d80256efc160
children fb2a0e76dcef
comparison
equal deleted inserted replaced
612:d80256efc160 613:c5991cdb0c4b
127 } 127 }
128 } 128 }
129 } 129 }
130 } 130 }
131 131
132 function rc(uri, k) { 132 function rc(uri, parse, k) {
133 var xhr = getXHR(); 133 var xhr = getXHR();
134 134
135 xhr.onreadystatechange = function() { 135 xhr.onreadystatechange = function() {
136 if (xhr.readyState == 4) { 136 if (xhr.readyState == 4) {
137 var isok = false; 137 var isok = false;
140 if (xhr.status == 200) 140 if (xhr.status == 200)
141 isok = true; 141 isok = true;
142 } catch (e) { } 142 } catch (e) { }
143 143
144 if (isok) 144 if (isok)
145 k(xhr.responseText); 145 k(parse(xhr.responseText));
146 else 146 else
147 alert("Error querying remote server!"); 147 alert("Error querying remote server!");
148 } 148 }
149 }; 149 };
150 150