//These flags will be used as control flags. Make these both false stop all ajax advantages from menu and submit controlAjaxMenuLoad = true;//make it false when something went wrong and you need to avoid all ajax advantages controlAjaxSubmit = true;//make it false when something went wrong and you need to avoid all ajax advantages //these are admin flag dont try to change it without permission //Flags will be used globally to set reset whether not added in url or jsp contentUsingAjax = false;//this flag will be used globally when not added in menu pageSubmitFlag = false;//this flag will be used globally when not added in jsp for submit //In acl_element_mst Url contentUsingAjax=false can be added to avoid menu clicked page load using ajax //In acl_element_mst Url dialogview=true can be added to open in new window //In jsp enableAjaxSubmit(false) can be added to avoid page submit using ajax showAjaxProgressBarFlag = true;//Make it false if progress bar is not required. to see fast page load function collectAllParaForAjax(urlStr) { var paraStr = urlStr ; try { paraStr = paraStr + run(); } catch(e) { } return paraStr; } function loadContentbyAjax(urlStr,parentObj,isFromMenu) { if(urlStr.indexOf("self.close()") != -1) { self.close(); return; } var dialogview = getdialogview(urlStr); if (dialogview) { var mwname = 'IFMS'; var prop = 'width='+screen.availWidth+',height='+screen.availHeight+',top=0,left=0,resizable=no,menubar=no,scrollbars=yes,toolbar=no,location=no,status=no'; window.open(urlStr,mwname,prop); if(getCloseParentWindow(urlStr)) self.close();//code added to close current window as new window is already opened return; } parentObj.getElementById('windowLocationHref').value = urlStr; showAjaxProgress(parentObj); urlStr += "&contentUsingAjax=true"; var paraStr = urlStr; //alert('urlStr='+urlStr); //if page is submitting using ajax then only this will required if(!isFromMenu) paraStr = collectAllParaForAjax(urlStr); xmlHttp= GetXmlHttpObject(); xmlHttp.onreadystatechange=function () { callBackLoadContentbyAjax(parentObj); } ; xmlHttp.open("POST",urlStr,true);//ture async : false sync xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlHttp.send(paraStr); } responseval = new Array(); function callBackLoadContentbyAjax(parentObj) { if(xmlHttp.readyState==complete_state) { try { var responseValue = xmlHttp.responseText; prepareResponses(responseValue); var currentApplicationResponse = responseval[0]; var contentResponse = responseval[1]; var tempcontentResponse = responseval[2]; //parentObj.getElementById("testtxt0").value=currentApplicationResponse; //parentObj.getElementById("testtxt1").value=contentResponse; //parentObj.getElementById("testtxt2").value=tempcontentResponse; setContentHtml("currentApplication",currentApplicationResponse,parentObj); setContentHtml("content",contentResponse,parentObj); setContentHtml("tempcontent",tempcontentResponse,parentObj); } catch(e){} hideProgressbar(); hideAjaxProgress(parentObj); } } function prepareResponses(tempresponseValue) { var count = 0; var flag = true; var compstr = ""; var start = new Array(); var startTag = new Array(); var last = tempresponseValue.length; while(flag) { compstr = '
'; if(tempresponseValue.indexOf(compstr) != -1) { start[count] = tempresponseValue.indexOf(compstr); startTag[count] = compstr.length; count++; } else flag = false; } for(i=0;i/gi,tempScriptTagStart); searchContent = searchContent.replace(/