var custID = document.getElementById("customerID").value;
var custName = document.getElementById("customerName").value;
var left = (screen.width/2) - (650/2);
var top = (screen.height/2) - (450/2);
if((document.getElementById("customerID").value == "") && (document.getElementById("customerName").value == "")){
alert("Please enter Customer ID or Customer Name to search.");
document.getElementById("customerID").focus();
return false;
} else {
//window.open("FileDocumentServlet?eid=<%=FileDocumentEventNames.BUSINESS_FORMATION_SEARCH_CUST%>&customerID="+custID+"&customerName="+custName, "customerWindow",
//"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=850,height=430,top="+top+",left="+left);
document.getElementById("button").click();
var url = "FileDocumentServlet?eid=<%=FileDocumentEventNames.BUSINESS_FORMATION_SEARCH_CUST%>&customerID="+custID+"&customerName="+custName;
if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
} else {// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function(){
if(xmlhttp.readyState == 4 && xmlhttp.status == 200){
var customerResult = xmlhttp.responseText;
document.getElementById("popupContact").innerHTML = customerResult;
return true;
} else {
document.getElementById("popupContact").innerHTML = document.getElementById("loadingMessageId").innerHTML;
}
}
xmlhttp.open("POST",url,true);
xmlhttp.send();
}
var custName = document.getElementById("customerName").value;
var left = (screen.width/2) - (650/2);
var top = (screen.height/2) - (450/2);
if((document.getElementById("customerID").value == "") && (document.getElementById("customerName").value == "")){
alert("Please enter Customer ID or Customer Name to search.");
document.getElementById("customerID").focus();
return false;
} else {
//window.open("FileDocumentServlet?eid=<%=FileDocumentEventNames.BUSINESS_FORMATION_SEARCH_CUST%>&customerID="+custID+"&customerName="+custName, "customerWindow",
//"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=850,height=430,top="+top+",left="+left);
document.getElementById("button").click();
var url = "FileDocumentServlet?eid=<%=FileDocumentEventNames.BUSINESS_FORMATION_SEARCH_CUST%>&customerID="+custID+"&customerName="+custName;
if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
} else {// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function(){
if(xmlhttp.readyState == 4 && xmlhttp.status == 200){
var customerResult = xmlhttp.responseText;
document.getElementById("popupContact").innerHTML = customerResult;
return true;
} else {
document.getElementById("popupContact").innerHTML = document.getElementById("loadingMessageId").innerHTML;
}
}
xmlhttp.open("POST",url,true);
xmlhttp.send();
}