I want to hide the alert box. Alert box at last line pops up first, after that when ajax call completes other alert box in if condition pops up, which pops up below the first one.
I want to hide the first alert box when second one pops up.
var xmlhttp;
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) {
if(xmlhttp.status==200) {
alert(getLocalizedString("partialExportFCdata_ui.msg3");
}else{
alert(getLocalizedString("partialExportFCdata_ui.msg4");
}
}
var obj = document.getElementById("ChkBoxHeader");
checkAll(false, obj.name);
}
xmlhttp.open("POST","FCTagService? htmlaction=updateTags&records="+sb.toString()+"&containsid="+containsid+"&catalogIdStr="+catalogIdStr, true);
xmlhttp.send();
alert(getLocalizedString("partialExportFCdata_ui.msg7"); //Last alert box