
function postaction(){
var URL="/cgi-bin/woc/woc.pl";
var self = this;
    self.httpPost1(URL);
}
function httpPost1(strURL) {
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            updatepagex(self.xmlHttpReq.responseText);
        }
    }
    self.xmlHttpReq.send(getquerystringx());
}
function getquerystringx() {
    //var form     = document.forms['f1'];
    //var db_name = form.db_name.value;
    //qstr = 'action=' + escape(word);  // NOTE: no '?' before querystring
    qstr = '&action=view_cats';  // NOTE: no '?' before querystring
    return qstr;
}

function updatepagex(str){
    document.getElementById("result").innerHTML = str;
}

window.onload=postaction

