var xmlhttp = new getXMLObject(); function saveRop(obj,pj_id,taskId) { var task_rop = document.getElementById('task_rop'); if(xmlhttp) { var url = "./?module=Project_Task&act=DoEditProjectTaskListDetail"; params = "pj_id=" + pj_id+"&taskId=" + taskId+"&task_rop=" + task_rop.value; xmlhttp.open("POST",url,true); xmlhttp.onreadystatechange = handleServerResponse; xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8'); xmlhttp.send(params); } } //XML OBJECT function getXMLObject() { var xmlHttp = false; try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP") // For Old Microsoft Browsers } catch (e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP") // For Microsoft IE 6.0+ } catch (e2) { xmlHttp = false // No Browser accepts the XMLHTTP Object then false } } if (!xmlHttp && typeof XMLHttpRequest != 'undefined') { xmlHttp = new XMLHttpRequest(); //For Mozilla, Opera Browsers } return xmlHttp; // Mandatory Statement returning the ajax object created } function handleServerResponse() { if (xmlhttp.readyState == 4) { if(xmlhttp.status == 200) { //alert(xmlhttp.responseText); document.getElementById("mapDiv").innerHTML =xmlhttp.responseText; } else { alert("Error during AJAX call. Please try again"); } } }