Hello,
a friend of mine helped me to develop a script in a google sheet that creates a PDF from a spreadsheet.
This pdf is aimed to be saved in google drive and the script works with a HTML files that creates a pop up with a clickable link to open and print the created PDF.
The script works perfectly, all is created and saved at the right place, no problem
the link works but the problem i have is that recently when i click it doesn't open the file in a new tab anymore. i have to right click on it and choose open in a new tab.
It's a problem because the sheet is used by other user that are not as experimented as me to pass over small ergonomical issues like this.
Anybody knows why the clickable link doesn't open a new chrome tab any more? here is the HTML file code.
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
<a href="<?= body ?>" onblur="onBlur()">Click here to open and print</a>
<script>
function onBlur() {
google.script.run.withSuccessHandler(close).resetDocOnClick();
}
function close() {
google.script.host.close();
}
</script>
</body>
</html>