Link HTML Pages using Google Apps Script Web App

preview_player
Показать описание
In this video, I demonstrate how to link HTML pages and pass parameters to HTML pages using Google Apps Script.

Video, Code, and Documentation can be found at:
Рекомендации по теме
Комментарии
Автор

HTML Link 1.html Code in Video Below:

<!DOCTYPE html>
<html>
<head>
<base target="_top">
<script>
function Back()
{
var url =
var link = document.createElement('a');
link.href = url+"?page=Index&message=Back From Link 1";
link.id = 'linkURL';


}
</script>
</head>
<body>
<h1>Link 1</h1>
<input type="button" value="Back to Main Menu" onclick="Back()" /><br>
<span>FIRST NAME: <?= firstname ?></span><br>
<span>LAST NAME: <?= lastname ?></span><br>
<?var url = getUrl();?><input type="hidden" value="<?= url ?>" id="url" />
</body>
</html>

CodeWithCurt
Автор

HTML Index.html Code in Video Below:

<!DOCTYPE html>
<html>
<head>
<base target="_top">
<script>
function Link1()
{
var firstname =
var lastname =

var url =
var link = document.createElement('a');
link.href = 1";
link.id = 'linkURL';



}
function Link2()
{
var firstname =
var lastname =

var url =
var link = document.createElement('a');
link.href = 2";
link.id = 'linkURL';


}
</script>
</head>
<body>
<h1>Main Menu</h1>
<input type="button" value="Link 1" onclick="Link1()" /><br>
<input type="button" value="Link 2" onclick="Link2()" /><br><br>
<label>First Name</label><br>
<input type="text" id="firstname" /><br>
<label> Last Name</label><br>
<input type="text" id="lastname" /><br><br>
<span><?= message ?></span>
<?var url = getUrl();?><input type="hidden" value="<?= url ?>" id="url" />
</body>
</html>

CodeWithCurt
Автор

Google Apps Script Code in Video Below:

function doGet(e) {
if (!e.parameter.page)
{
var htmlOutput =
htmlOutput.message = '';
return htmlOutput.evaluate();
}
else if(e.parameter['page'] == 'Link 1')
{

var htmlOutput = 1');
htmlOutput.firstname = e.parameter['firstname'];
htmlOutput.lastname = e.parameter['lastname'];
return htmlOutput.evaluate();
}
else if(e.parameter['page'] == 'Link 2')
{
var htmlOutput = 2');
htmlOutput.firstname = e.parameter['firstname'];
htmlOutput.lastname = e.parameter['lastname'];
return htmlOutput.evaluate();
}
else if(e.parameter['page'] == 'Index')
{
var htmlOutput =
htmlOutput.message = e.parameter['message'];
return htmlOutput.evaluate();
}
}


function getUrl() {
var url =
return url;
}

CodeWithCurt
Автор

You are the man! It helped me a lot in my project. Thank you!

FlavioMunizdaSilvaJr
Автор

Thanks for your video. Your explain is clean even if I am not good at English.

Smile-yjwz
Автор

anyone know how valid this tutorial and code is today? I'm really trying to find the right answer for how to link html pages within a web app. So far every method I've tried throws various errors. It seems like it's just not possible.

duckdodgers
Автор

sir can you have tutorial on how to pull data from google sheet base on the log in of user

francismata
Автор

Thanks for the videos!! Help a lot!! Just a question... Is this work on webapp inside a Iframe? is it possible to pass values between pages? thanks again!

CesarAndreotti
Автор

Based on your research, is there anyway to do this same process but with a POST process? so that the URL does not have parameters for users to edit? Either that, or a way to encrypt the GET data?

kensleylewis
Автор

The code-link appears to be missing; perhaps the comment with the link code was delete, besides this video isn't on you main site either (although it rich with information, it's still missing one, I searched everything, please include again.... thanks Curt).

beckynwokenkwo
Автор

This is awesome video. I was just looking for it

KhairulBasarAbuAbdullah
Автор

You're a legend, thank you so much!

mikebertoulli
Автор

Hi, Thank you for this awesome video, quick question Is there a way to submit multiple HTML forms to one google sheets on one DoGet function?

pulendlovu
Автор

Hello, many thanks for your great video. Anyway i wonder, because i get an error 400 calling "link 1". I'm sure, i'm calling the right url with the right parameter. Calling the generated url manually runs correctly. OK, I've slight changed the source to accomplish my needs, but it's essentially your solution. Are there common issues regarding an error 400, that i could looking for?

stefanozito
Автор

hello, thank you for your kind sharing. if i may, i wonder if i could redirect to any other web page except the url under my own google web app, and auto fiill something as well?
in other words, is it possible to build a <form> consisted with <input>&<submit>, as soon as i click the "submit" button, i will redirect to a web page and auto fill in the target blanks with previous<input> ?


please help me.

thank you

firesaga
Автор

HI curt, I literally copy your code to test it myself I did not know why the e.parameter is not working cannot read property parameter. I don't know what to do :( hope you can help me

liannaharriola
Автор

Sir...How to create responsive video playlist gallery in login and logout using google webapp script...

mayursawant
Автор

Hey man is it possible to give some styles with css? How can you connect to css code?

eduardocanelo-lospetersenc
Автор

great video, but can't believe how many hoops google apps has us jumping through just to create a simple link goddamn

JT-glou
Автор

ffs just the linking pages bit please... all the other shit muddies the water

my_codingchannel
welcome to shbcf.ru