[Migrated content. Thread originally posted on 09 November 2005]
I am busy with an application which needs to use the httpRequest object to call a cobol program residing on a webserver using cgi and passing values back and forthIs this possible and how will the cobol cgi program read data and pass data back ?
I have tried this with a standard cgi program, and I always get a gateway error.
ie - cobol program
01 input-form is external-form.
02 input-data pic x(1) is identified by 'testout'.
accept input-form.
move 1 to input-data.
display input-form.
stop run.
ie - asp page using javascript to call remote object
function showSickNote(theForm, theLineNo)
{
url = 'webdays.acu?testout=1';
loadXMLDoc(url);
alert(testout);
}
var req;
function loadXMLDoc(url)
{
// branch for native XMLHttpRequest object
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
req.onreadystatechange = processReqChange;
req.open("POST", url, false);
req.send(null);
// branch for IE/Windows ActiveX version
} else if (window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
if (req) {
req.onreadystatechange = processReqChange;
req.open("POST", url, false);
req.send();
}
}
}
function processReqChange()
{
// only if req shows "complete"
if (req.readyState == 4) {
// only if "OK"
if (req.status == 200) {
// ...processing statements go here...
} else {
alert("There was a problem retrieving the XML data:\\n" req.statusText "\\nState:" req.readyState "\\nCode:" req.status);
}
}
}
//-->



