I have a script that returns the following error in firefox
invalid assignment left-hand side
In the code I am working in a child window and making the ajax call. I want to perform the task and then load the parent window with the new info and close the child window once that is done. In the past I would have just had a single ajax call and then use window.opener.location.reload(); However, this sends a message to the user telling them they need to resend the data which is annoying to the users.
here is the code the purple colored line is the one that firebug points to
Code:
function MoveToFolder(App,fldr,VJ,VL,VF,Rid){
var xmlHttp;
if (navigator.userAgent.indexOf("MSIE")>=0){
var strName="Msxml2.XMLHTTP";
if (navigator.appVersion.indexOf("MSIE 5.5")>=0){
strName="Microsoft.XMLHTTP";
}
try{
xmlHttp = new ActiveXObject(strName);
}
catch(e){
//alert("Error. Scripting for ActiveX might be disabled")
return e
}
}
else if(window.XMLHttpRequest){
xmlHttp = new XMLHttpRequest();
}
var url="/admin/ajax/MoveFolder.asp";
var params = "ApplicationID=" + App + "&folderID=" + fldr;
xmlHttp.open("POST", url , true);
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlHttp.onreadystatechange = function() {
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
var url="/admin/ajax/FillApplicantList.asp";
var params = "CPType=L&JobID=" + VJ + "&folderID=" + VF + "&LocationID=" + VL+ "&RoleID=" + Rid;
xmlHttp.open("POST", url , true);
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlHttp.onreadystatechange = function() {
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
window.opener.document.getElementById("applicantList") = xmlHttp.responseText; window.close();
}
}
xmlHttp.send(params)
}
}
xmlHttp.send(params)
}