/* * To change this template, choose Tools | Templates * and open the template in the editor. */ var handleResponseFlag=false; function createRequestObject(){ var req; try { // Firefox, Opera, Safari req = new XMLHttpRequest(); }catch (e){ // Internet Explorer try { //For IE 6 req = new ActiveXObject("Msxml2.XMLHTTP"); }catch (e){ try { //For IE 5 req = new ActiveXObject("Microsoft.XMLHTTP"); }catch (e){ alert('Your browser is not IE 5 or higher, or Firefox or Safari or Opera'); } } } return req; } //Make the XMLHttpRequest Object var http = createRequestObject(); //var ajax_flag=null; // code Modify Here by Mithun Pan /////////// function isTemporySave(method, url,eanlist,pan){ var app=eanlist+pan; if(method == 'post' || method == 'POST' || method == 'get' || method == 'GET'){ http.open(method,url+'?app_no='+app+"&pan="+pan+"&eanlist="+eanlist,true); http.onreadystatechange = handleResponse1; http.send(null); } return handleResponseFlag; //alert("with in called function===>"+ajax_flag); // return ajax_flag; } function handleResponse1(){ if(http.readyState == 4 && http.status == 200){ handleResponseFlag=false; var response = http.responseText; if(response){ var applValue = new Array(); applValue = http.responseText.toString().toUpperCase().split("~"); // alert(applValue[1]); // document.getElementById("pan_tan").value = (applValue[1]=="NULL")?"":applValue[1]; if(applValue[1]=="YES"){ // ajax_flag=false; // alert("with in inner called function===>"); afterAssVfortempLoad(); document.getElementById("rRejectAppMsgList").style.display="none"; document.getElementById("rMsgList").style.display="block"; document.getElementById("registrationList").style.display="none"; handleResponseFlag=false; }else if(applValue[1]=="NO"){ handleResponseFlag=true; conframPanEanContinue(); }else if(applValue[1]=="ALREADYSUBMIT"){ // You have already submit // alert("hiii"); document.getElementById("pan_tan").value=""; document.getElementById("enlishment_no").value=""; document.getElementById("pan_tan_temp").value=""; document.getElementById("enlishment_no_temp").value=""; document.getElementById("showtimer3").style.display="none"; document.getElementById("showtimer4").style.display="block"; handleResponseFlag=true; }else if(applValue[1]=="REJECTED"){ afterAssVfortempLoad(); // your application is rejeted r u want load data document.getElementById("rMsgList").style.display="none"; document.getElementById("registrationList").style.display="none"; document.getElementById("rRejectAppMsgList").style.display="block"; handleResponseFlag=false; } // ajax_flag=true; // document.getElementById("pan_check_area").innerHTML = ""; // document.getElementById("imageField").disabled =false; } } return handleResponseFlag; // alert("with in inner called function===>"+ajax_flag); } // modify end function isRegistered(method, url,val){ if(method == 'post' || method == 'POST' || method == 'get' || method == 'GET'){ http.open(method,url+'?pan_no='+val,true); http.onreadystatechange = handleResponse; http.send(null); } //alert("with in called function===>"+ajax_flag); // return ajax_flag; } function handleResponse(){ if(http.readyState == 4 && http.status == 200){ var response = http.responseText; if(response){ // 56 alert(response.toString()); var applValue = new Array(); applValue = http.responseText.toString().toUpperCase().split("~"); // document.getElementById("pan_tan").value = (applValue[1]=="NULL")?"":applValue[1]; if(applValue[1]=="YES"){ // ajax_flag=false; // alert("with in inner called function===>"); document.getElementById("pan_check_area").innerHTML = "Already Registered "; document.getElementById("pan_tan").value =""; document.getElementById("imageField").disabled =true; document.getElementById("pan_tan").focus(); } else if(applValue[1]=="NO") // ajax_flag=true; document.getElementById("pan_check_area").innerHTML = ""; document.getElementById("imageField").disabled =false; } } // alert("with in inner called function===>"+ajax_flag); } //called from VS_Application_Form.jsp on selection of radio button for specifying floor function activateFlatFloor(method, url,val,val2,val3){ // alert(val); // alert(val2); // alert(val3); if(method == 'post' || method == 'POST' || method == 'get' || method == 'GET'){ http.open(method,url+'?rhe_type='+val+'&rhe_nm='+val2+'&rad='+val3,true); http.onreadystatechange = activatedFlatFloor; http.send(null); } } function activatedFlatFloor(){ if(http.readyState == 4 && http.status == 200){ var response = http.responseText; if(response){ // alert(response); //If yes is selected for specifying floor,then response is written to Select_n_flat div document.getElementById("Select_n_flat").innerHTML = response; document.getElementById("Select_flat").innerHTML =""; //Select_flat is kept blank } } } //called from VSFlatFloor.jsp on selection of no of flats function activateFlatTable(method,url,val,val2,val3){ if(method == 'post' || method == 'POST' || method == 'get' || method == 'GET'){ http.open(method,url+'?rhe_tp='+val+'&rh_nm='+val2+'&n_flat='+val3.value,true); http.onreadystatechange = activatedFlatTable; http.send(null); } } function activatedFlatTable(){ // alert("Kousikk"); if(http.readyState == 4 && http.status == 200){ var response = http.responseText; if(response){ // alert(response); document.getElementById("Select_flat").innerHTML = response; } } } //called from VSFlatTable.jsp on selection of a particular block function getVSFlats(method, url,val,val2,val3){ // alert(val); // alert(val2); // alert(val3.name); var st=val3.name; if(method == 'post' || method == 'POST' || method == 'get' || method == 'GET'){ http.open(method,url+'?rhe_name='+val+'&rhe_type='+val2+'&cntrl_nm='+st+'&rhe_block='+val3.value,true); if(val3.name=="sel_block1") { // alert(st); http.onreadystatechange = setVSFlats1; } else if(val3.name=="sel_block2") http.onreadystatechange = setVSFlats2; else if(val3.name=="sel_block3") http.onreadystatechange = setVSFlats3; else if(val3.name=="sel_block4") http.onreadystatechange = setVSFlats4; http.send(null); } } function setVSFlats1(){ if(http.readyState == 4 && http.status == 200){ var response = http.responseText; if(response){ // alert(response); document.getElementById("area_flat1").innerHTML = response; } } } function setVSFlats2(){ if(http.readyState == 4 && http.status == 200){ var response = http.responseText; if(response){ // alert(response); document.getElementById("area_flat2").innerHTML = response; } } } function setVSFlats3(){ if(http.readyState == 4 && http.status == 200){ var response = http.responseText; if(response){ // alert(response); document.getElementById("area_flat3").innerHTML = response; } } } function setVSFlats4(){ if(http.readyState == 4 && http.status == 200){ var response = http.responseText; if(response){ // alert(response); document.getElementById("area_flat4").innerHTML = response; } } }