I am tring to create a simple function with Google Apps Script that should redirect a user after submitting a form. The form is embedded in my webpage using an iframe. The function can be easily be triggered by the form-submit event, and is currently firing. However, I do get an error because "window is not defined". I am completely new to Google Apps Scripts and I cannot find a solid reference on how to redirect to a specific link.
This is the function:
function form_submit_redirect() {
window.location.href = "/users/";
}
This is the error:
Error ReferenceError: window is not defined at form_submit_redirect(Code:2:3)