This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
Incam_SGD/plugins/MyDropDocumentsPlugin/js/update.js

39 lines
1.2 KiB
JavaScript
Raw Permalink Normal View History

var currloc = location.pathname.substring(0,location.pathname.lastIndexOf('/')+1);
var user = '';
function CheckFolderExists(){
xmlHttpMyDropDocuments=GetXmlHttpMyDropDocumentsObject();
if (xmlHttpMyDropDocuments===null){
alert ("Browser does not support HTTP Request");
return;
}
var url=MY_DROP_DOCUMENTS;
xmlHttpMyDropDocuments.onreadystatechange=MyDropDocumentsStateChanged;
xmlHttpMyDropDocuments.open("GET",url,true);
xmlHttpMyDropDocuments.send(null);
}
function MyDropDocumentsStateChanged(){
if (xmlHttpMyDropDocuments.readyState==4 || xmlHttpMyDropDocuments.readyState=="complete"){
if(xmlHttpMyDropDocuments.responseText != ""){
document.getElementById("MyDropDocumentsBlock").innerHTML=xmlHttpMyDropDocuments.responseText;
}
}else{
document.getElementById("MyDropDocumentsBlock").innerHTML=' Comprobando la carpeta de documentos personales...<br><br><br>';
}
}
function GetXmlHttpMyDropDocumentsObject(){
var objXMLHttpMyDropDocuments=null;
if (window.XMLHttpRequest){
objXMLHttpMyDropDocuments=new XMLHttpRequest();
}else if (window.ActiveXObject){
objXMLHttpMyDropDocuments=new ActiveXObject("Microsoft.XMLHTTP");
}
return objXMLHttpMyDropDocuments;
}