One of our programmers is having an issue with a Javascript error and asked me to research it for him. Here's the code:
The error occurs at line 12
var resp = eval( '(' + ajaxRequest.res ponseText + ')' );
Code:
function dataRequest(action,dataValue,eID) {
if (ajaxRequest.readyState!=0) return;
if(dataValue=="") return;
if(dataValue=='') dataValue='0';
url = "https://207.42.229.4/cgi-bin/D3CGIServer/processAjax/~/" + action + "/" + dataValue + "/" + eID;
ajaxRequest.open("POST", url, true);
ajaxRequest.onreadystatechange = updateCS;
ajaxRequest.send(null);
}
function updateCS() {
if(ajaxRequest.readyState == 4 && ajaxRequest.status == 200) {
var resp = eval( '(' + ajaxRequest.responseText + ')' );
if(resp.errors!=""){
alert(resp.errors)
}
if(resp.response!=""){
eID=resp.element
if(eID!=""){
okayToSelect=resp.focus
document.getElementById(eID).value=resp.response;
if(okayToSelect=='YES'){
document.getElementById(eID).select();
}
}
}
ajaxRequest=CreateRequest();
}
}
var resp = eval( '(' + ajaxRequest.res ponseText + ')' );
Comment