I have a web app with Google Apps Script and would like to take a URL parameter and use it in modifying my HTML via Javascript, but am finding this tricky.
If I try using window.location
in my Javascript it gives a different URL than the one shown in the address bar. The URL shown in the address bar is like this ... https://script.google.com/macros/s/MY_SCRIPT_ID/exec?param1=value1 .... but window.location
gives something like this https://SOME_SORT_OF_LONG_ID-script.googleusercontent.com/userCodeAppPanel (it doesn't have param1 / value1 at all).
I know how to get the parameter value when I'm in the doGet(e)
function -- by using e.parameter.param1
-- but I don't know how to be able to then subsequently use that value in some Javascript.
Help, please!