Generacion de Archivos con Nombre (Matriz o Foro )

git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C223
This commit is contained in:
dmendez 2018-07-12 21:00:45 +00:00
parent 52f39eb548
commit a00b12e6b6

View file

@ -1687,36 +1687,7 @@ this.ExportarADoc = function (TipoComentario, filename) {
html = html + postHtml;
var blob = new Blob(['\ufeff', html], {
type: 'application/msword'
});
// Specify link url
//var url = 'data:application/vnd.ms-word;charset=utf-8,' + encodeURIComponent(html);
var url = 'data:application/vnd.ms-word;charset=utf-8,' + encodeURIComponent(html);
// Specify file name
filename = filename ? filename + '.doc' : 'document.doc';
// Create download link element
var downloadLink = document.createElement("a");
document.body.appendChild(downloadLink);
if (navigator.msSaveOrOpenBlob) {
navigator.msSaveOrOpenBlob(blob, filename);
} else {
// Create a link to the file
downloadLink.href = url;
// Setting the file name
downloadLink.download = filename;
//triggering the function
downloadLink.click();
}
document.body.removeChild(downloadLink);
ExportarAMsWord(html, filename);
};