2

I continue to get a white screen on submit button press. I have tried many techniques, and only have been able to get a white screen. Any thoughts on what may be wrong?

Html file:

<!DOCTYPE html>
<html>
  <head>
    <base target="_top">
          <script>
  function handleFormSubmit(formObject) {
    google.script.run.withSuccessHandler(updateUrl).processForm(formObject);
  }
    function onFailure(error) {
    var div = document.getElementById('output');
    div.innerHTML = "ERROR: " + error.message;
  }
    </script>
  </head>
  <body>
    Hello, World!
     <form id="myForm" onsubmit="handleFormSubmit(this)">
      <input type="text" name="search">
      <input type="submit" value="Submit" />
      
    </form>
    <input type="button" value="Close"
        onclick="google.script.host.close()" />
        
     
  </body>
</html>

Code.gs:

function processForm(formObject) {
Logger.log('Form was submitted!');
   var missVar = 999;
   var html = HtmlService.createTemplateFromFile('missingVar');
   html.missingVar = missVar;
   var htmlOutput = html.evaluate();

  
  
}

missingvar.html:

<!DOCTYPE html>
<html>
  <head>
    <base target="_top">
  </head>
  <body>
    hello!!
    <?= missingVar ?>
    
  </body>
</html>
OblongMedulla
  • 1,471
  • 9
  • 21

0 Answers0