Skip to content

Commit

Permalink
save jhd
Browse files Browse the repository at this point in the history
  • Loading branch information
SanjayPrabhakaran committed Dec 6, 2024
1 parent c1a7539 commit d9e9100
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions SJPv6/www/sjp.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ function getLagnaTable(AscData,date_time,longitude,latitude){
}

// Function to download data to a file
function download(data, filename, type) {
function download_old(data, filename, type) {
var file = new Blob([data], {type: type});
if (window.navigator.msSaveOrOpenBlob) // IE10+
window.navigator.msSaveOrOpenBlob(file, filename);
Expand All @@ -407,6 +407,17 @@ function download(data, filename, type) {
}, 0);
}
}
function download(data, filename, type) {
var blob = new Blob([data], { type: 'application/octet-stream' });
var link = document.createElement('a');
link.href = window.URL.createObjectURL(blob);
link.download = filename;

// Append to the body, click and remove
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
function deleteAllCookies() {
const cookies = document.cookie.split(";");

Expand Down Expand Up @@ -461,7 +472,7 @@ function getJHDStringEsc( parray){
+"0\r\n"//Line18:1 (If 1 use temperature for calculations)
;
download(str,parray['chartname']+".jhd","text");
return str;
//return str;
}


Expand Down

0 comments on commit d9e9100

Please # to comment.