I am working with a code that should validate a user and open a form with filtered data for that user. To open the form after validating, use a dynamic method that was published here and works well for me:
var rutaWeb = ScriptApp.getService().getUrl();
function doGet(e) {
var page = e.parameter.p || "myPrueba";
return HtmlService.createTemplateFromFile(page).evaluate()
.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL);
}
in the index:
function abrirUrl(url) {
var a = document.createElement("a");
a.target = "_blank";
a.href = url;
a.click();
}
var url = "<?!= rutaWeb + '?p=Inicio' ?>";
function abrirInicio(){
var tname = document.getElementById("nomcon").value;
abrirUrl(url);
//enviar tname???
}
I've tried several options here link but they do not work for me.
Am I doing everything wrong or am I missing?