snowboardr
Programmer
I sware javascript hates me and no one else! I have looked at this code for the last 2 hours and just can't seem to get it to work
I wouldn't see why I can't pass an id to the other function on this line:
Ps. I am getting a type mismatch error, I have tried joining these two functions together, but nothing happens...

Ps. I am getting a type mismatch error, I have tried joining these two functions together, but nothing happens...
Code:
LoadPOSTHTMLHttp.onreadystatechange = getLoadPOSTHTMLHttpResponse(intRow);
Code:
var LoadPOSTHTMLHttp = null;
function LoadPOSTHtml(iCall,cat1,cat2,intRow) {
LoadPOSTHTMLHttp = createRequestObject();
var url2="ajax_display.asp?call=" + iCall + "&cat1=" + cat1 + "&cat2=" + cat2
LoadPOSTHTMLHttp.open('GET', url2, true);
LoadPOSTHTMLHttp.onreadystatechange = getLoadPOSTHTMLHttpResponse(intRow);
LoadPOSTHTMLHttp.send('');
}
function getLoadPOSTHTMLHttpResponse(intRowRow) {
alert('true')
if (LoadPOSTHTMLHttp != null)
if (LoadPOSTHTMLHttp.readyState == 4)
if (LoadPOSTHTMLHttp.status == 200)
document.getElementById('viewpoststable'+intRowRow).innerHTML = LoadPOSTHTMLHttp.responseText;
}
function createRequestObject() {
var ro;
/*@cc_on
@if (@_jscript_version >= 5)
try {
ro = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
ro = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
ro = false;
}
}
@else
ro = false;
@end @*/
if (!ro && typeof XMLHttpRequest != 'undefined') {
try {
ro = new XMLHttpRequest();
} catch (e) {
ro = false;
}
}
return ro;
}