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:
parent
52f39eb548
commit
a00b12e6b6
1 changed files with 2 additions and 31 deletions
|
|
@ -1687,36 +1687,7 @@ this.ExportarADoc = function (TipoComentario, filename) {
|
||||||
|
|
||||||
html = html + postHtml;
|
html = html + postHtml;
|
||||||
|
|
||||||
var blob = new Blob(['\ufeff', html], {
|
ExportarAMsWord(html, filename);
|
||||||
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);
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
Loading…
Add table
Reference in a new issue