X-Git-Url: http://git.thejh.net/?p=cwebfiles.git;a=blobdiff_plain;f=static%2Findex.html;h=995d45b6f4d3e97d71f27807d64aa7eb4d3121be;hp=1e6adcc7d14492bd8c354473678788aaa3de8b1c;hb=HEAD;hpb=44ce233ab82694ae1c85d0969ec3dd89d04c4992 diff --git a/static/index.html b/static/index.html index 1e6adcc..995d45b 100644 --- a/static/index.html +++ b/static/index.html @@ -27,12 +27,18 @@ function cgireq(script, qs, body, cb) { req.open((body!=null)?'POST':'GET', '/cgi-bin/cwebfiles/'+script+(qs?'?'+qs:''), !!cb) if (cb) { req.onloadend = function() { - cb(req.status, req.responseText) + var status = req.getResponseHeader("Status") || req.status.toString(10) + status = status.split(' ')[0] + status = parseInt(status, 10) + cb(status, req.responseText) } } req.send(body) if (!cb) { - return {status: req.status, data: req.responseText} + var status = req.getResponseHeader("Status") || req.status.toString(10) + status = status.split(' ')[0] + status = parseInt(status, 10) + return {status: status, data: req.responseText} } }