Edit D:\app\Administrator\product\11.2.0\dbhome_1\oc4j\j2ee\oc4j_applications\applications\em\em\jsLibs\ReportElemJScript.js
//global constants used in the jsp pages var TYPE_TXT_BOX = "1"; var TYPE_LIST_BOX = "2"; var TYPE_HIDDEN = "3"; var USE_OLD_ANCHOR = "USE_OLD_ANCHOR" //*** This removes the request param(including value) in the URL *****// function removeFromURL(xRmParam){ return removeFromxURL(document.location.href,xRmParam); } function removeFromxURL(xURL,xRmParam){ var str = xURL; var strtIndx=str.indexOf(xRmParam+"="); if(strtIndx <=0) return xURL; var endIndx=str.indexOf("&",strtIndx); if(str.substring(strtIndx-1,strtIndx)=="&"){ strtIndx = strtIndx-1; } else{ if(endIndx!=-1){ endIndx=endIndx+1; } } var strToRm; if(endIndx!=-1){ strToRm=str.substring(strtIndx,endIndx); } else{ strToRm=str.substring(strtIndx); } var re=new RegExp(strToRm); str=str.replace(re,""); return str; } /*** adding the param in the url after removing it, and appends the anchor text if exists **/ function getParamAddedURL(xParamName,xParamValue,xAnchorText){ return getParamAddedxURL(document.location.href,xParamName,xParamValue,xAnchorText); } function getParamAddedxURL(xURL,xParamName,xParamValue,xAnchorText){ var urlStr = xURL; var lastStr=""; if(urlStr.indexOf("#")>0){ lastStr=urlStr.substring(urlStr.indexOf("#")); urlStr=urlStr.substring(0,urlStr.indexOf("#")); } urlStr = removeFromxURL(urlStr,xParamName); if(urlStr.indexOf("?")>0){ urlStr = urlStr +"&"+ xParamName +"="+xParamValue; }else{ urlStr = urlStr +"?"+ xParamName +"="+xParamValue; } if( xAnchorText == null || xAnchorText== "" || xAnchorText == "null" ) return urlStr; else if( xAnchorText==USE_OLD_ANCHOR ) return urlStr + lastStr; else return urlStr +"#"+ xAnchorText; } /************ adding the params in the url after removing it, and appends the anchor text if exists************/ function getParamsAddedURL(xParamNames,xParamTypes,xAnchorText){ return getParamsAddedxURL(document.location.href,xParamNames,xParamTypes,xAnchorText); } function getParamsAddedxURL(xURL,xParamNames,xParamTypes,xAnchorText){ var urlStr =xURL; var lastStr=""; if(urlStr.indexOf("#")>0){ lastStr = urlStr.substring(urlStr.indexOf("#")); urlStr = urlStr.substring(0,urlStr.indexOf("#")); } var ParamName,ParamValue,ParamType; for(i=0;i<xParamNames.length;i++){ ParamName = xParamNames[i]; ParamValue=""; ParamType=xParamTypes[i]; if(ParamType!=null && !isNaN(parseInt(ParamType)) && eval("document.forms[0]."+ParamName) ){ ParamType = parseInt(ParamType); if( ParamType == TYPE_TXT_BOX || ParamType == TYPE_HIDDEN ){ ParamValue = eval("document.forms[0]."+ParamName+".value"); }else if(ParamType == TYPE_LIST_BOX ){ ParamValue = eval( "document.forms[0]."+ParamName +".options[document.forms[0]."+ParamName +".selectedIndex].value" ); } } urlStr = removeFromxURL(urlStr,ParamName); if(urlStr.indexOf("?")>0){ urlStr = urlStr +"&"+ ParamName +"="+ ParamValue; }else{ urlStr = urlStr +"?"+ ParamName +"="+ ParamValue; } } if( xAnchorText == null || xAnchorText== "" || xAnchorText == "null" ) return urlStr; else if( xAnchorText==USE_OLD_ANCHOR ) return urlStr + lastStr; else return urlStr +"#"+ xAnchorText; } //******** GET THE URL WITH THE ANCHOR TEXT GIVEN ******************// function getAnchoredURL(xAnchorText){ return getAnchoredxURL(document.location.href,xAnchorText); } function getAnchoredxURL(xURL,xAnchorText){ var urlStr =xURL; var lastStr=""; if(urlStr.indexOf("#")>0){ lastStr = urlStr.substring(urlStr.indexOf("#")); urlStr = urlStr.substring(0,urlStr.indexOf("#")); } if( xAnchorText == null || xAnchorText== "" || xAnchorText == "null" ) return urlStr; else if( xAnchorText==USE_OLD_ANCHOR ) return urlStr + lastStr; else return urlStr +"#"+ xAnchorText; } function browseURL(){ browsexURL(document.location.href); } function browsexURL(xURL){ document.location.href = xURL; } /**It setting the anchor after loading all the imgs in the page**/ function setAnchorInPage(pAnchorName){ var url = document.location.href; if(pAnchorName==null || pAnchorName==""){ if( url.indexOf("#")>0){ pAnchorName = url.substring(url.indexOf("#")+1); }else{ return; } } //if(url.indexOf("#"+pAnchorName) <=0 ) return; var setAnchor = false; if (document.images){ var numOfImgs = document.images.length; for(i=0;i<numOfImgs;i++){ if ( !document.images[i].complete ){ setAnchor=false; break; } setAnchor = true; } if(!setAnchor){ window.setTimeout( "setAnchorInPage(\""+ pAnchorName +"\")",1); } }else{ setAnchor = true; } if(setAnchor){ document.location.href = "#"+pAnchorName; } } /*** for auto reload in dashboard page *******************/ function initDash_Reload(xStopCount){ dash_currentCount = 0; dash_stoppingCount = xStopCount; dash_windowName = window.name; windowDeactiveFlag = false; //document.title = window.status =dash_windowName; //for debugging if(dash_windowName!=null && dash_windowName.indexOf('@')>1){ dash_currentCount = parseInt(window.name.split('@')[1]); //getting the count from the window.name windowDeactiveFlag = eval(""+window.name.split('@')[3]); }else{ dash_windowName = setDashWindowName( dash_currentCount, windowDeactiveFlag);//if no value in window.name set it to 0 } } function autoRefresh(pIntervalTime,pMsgNodeId,pMsg){ if(!windowDeactiveFlag){dash_currentCount = 0;} if(dash_currentCount < dash_stoppingCount){ setTimeout('reloadPage()', pIntervalTime); } else{ //adding message //var myElement = document.getElementById(pMsgNodeId); //get all the nodes contain the name <span> and chech for the id //given, if it exists then added the img and msg node var myAllElements = document.getElementsByTagName('span'); //span if(pMsg==null || pMsg==''){ //getting the nls translated msg from hidden variable "autoReloadMsgId" var pMsgElem = document.getElementById("autoReloadMsgId"); if(pMsgElem!=null){pMsg=pMsgElem.value;} } if(myAllElements!=null){ for(j=0;j<myAllElements.length;j++){ myElement = myAllElements[j]; if(myElement.childNodes.length==0 && myElement.getAttribute('id')== pMsgNodeId){ var imgPathIdElem = document.getElementById("imgPathId"); //adding img using the hidden variable "imgPathId" if(imgPathIdElem!=null){ var InformationImg = document.createElement("IMG"); InformationImg.setAttribute("src",imgPathIdElem.value); InformationImg.setAttribute("align",'middle'); myElement.appendChild(InformationImg); } //adding the message var refreshTxt = document.createTextNode(" "+pMsg); myElement.appendChild(refreshTxt,myElement); } } } } } function reloadPage(){ setDashWindowName((dash_currentCount+1), windowDeactiveFlag ); window.location.reload(); } //should be called when the window.onfocus function resetReloadCounting(){ windowDeactiveFlag=false; dash_currentCount=0; setDashWindowName(dash_currentCount,windowDeactiveFlag); } //should be called when the window.onblur function startReloadCounting(){ windowDeactiveFlag=true; dash_currentCount=0; setDashWindowName(dash_currentCount,windowDeactiveFlag); } //setting and return the window name with required params function setDashWindowName(xCountValue,xWindowDeactiveFlag){ window.name = 'dashboard@'+xCountValue+'@'+(new Date().getTime())+'@'+xWindowDeactiveFlag; return (window.name); }
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de