![](/img/trans.png)
[英]How can I save this (Modal Dialog) HTML in pdf format in a Google Drive folder by clicking on a button?
[英]Google Spreadsheet modal dialog button not responding
我有一个带有表单的模式对话框,用于上传 2 个文件。 该对话框由自定义菜单激活,单击按钮时,它会启动自定义 function。
当 HTML 很简单时,只有表单输入区域,它才能正常工作。
但是我想在顶部添加一些说明,当我添加它们时,按钮停止响应。
这是有效的代码:
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons1.css">
</head>
<form style="font-size:16px">
Excel MercadoLibre
<input type="file" name="fileML">
<br>
<br>
Excel Contabilium
<input type="file" name="fileContabilium">
<br><br><br>
<input type="button" value="Importar" class="action " style="font-size:16px" style="height: 150px;" style="text-align:center;"
onclick="google.script.run
.withSuccessHandler(google.script.host.close)
.uploadFile(this.parentNode)" />
</form>
</html>
这是我添加指令时的代码,唯一的区别是添加了第 8-10 行:
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons1.css">
</head>
<form style="font-size:16px">
1) En el <a href="https://www.mercadolibre.com.ar/ventas/listado" target="_blank">listado de ventas de ML</a>, filtrar por el período a procesar, y descargar el excel de ventas.<p>
2) En el <a href="https://app.contabilium.com/modulos/ventas/integraciones.aspx?" target="_blank">listado de ventas de Contabilium</a>, filtrar por el período a procesar, y exportar el excel simple.<p>
3) Subir ambos archivos:<p>
Excel MercadoLibre
<input type="file" name="fileML">
<br>
<br>
Excel Contabilium
<input type="file" name="fileContabilium">
<br><br><br>
<input type="button" value="Importar" class="action " style="font-size:16px" style="height: 150px;" style="text-align:center;"
onclick="google.script.run
.withSuccessHandler(google.script.host.close)
.uploadFile(this.parentNode)" />
</form>
</html>
在您的 HTML 中,我担心没有包含<p>
。 至此,我担心谷歌端解析this.parentNode
可能会出现问题。 那么,下面的修改呢?
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons1.css">
</head>
<form style="font-size:16px">
<p>1) En el <a href="https://www.mercadolibre.com.ar/ventas/listado" target="_blank">listado de ventas de ML</a>, filtrar por el período a procesar, y descargar el excel de ventas.</p>
<p>2) En el <a href="https://app.contabilium.com/modulos/ventas/integraciones.aspx?" target="_blank">listado de ventas de Contabilium</a>, filtrar por el período a procesar, y exportar el excel simple.</p>
<p>3) Subir ambos archivos:</p>
Excel MercadoLibre
<input type="file" name="fileML">
<br>
<br>
Excel Contabilium
<input type="file" name="fileContabilium">
<br><br><br>
<input type="button" value="Importar" class="action " style="font-size:16px" style="height: 150px;" style="text-align:center;"
onclick="google.script.run
.withSuccessHandler(google.script.host.close)
.uploadFile(this.parentNode)" />
</form>
</html>
<br>
也可以使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.