Creating the dispatch form
As mentioned earlier, we will create the dispatch form now. Create a new HTML file named as Dispatch
and enter the following code in it:
<!-- Dispatch.html --> <!DOCTYPE html> <html> <head> <base target="_top"> <link rel="stylesheet" href="//ssl.gstatic.com/docs/script/css/add-ons1.css" /> <script src="//ajax.googleapis.com/ajax/libs/jquery/ 1.10.2/jquery.min.js"></script> <script> // On document load, assign submit function to the submit // button's click event $(function(){ $("#btnSubmit").click(submit); }); function submit(){ // Remove already displayed messages, if any. $("#success,#error").remove(); this.disabled = true; google.script.run .withSuccessHandler(function(msg,elem){ elem.disabled = false; showSuccess(msg,elem); ...
Get Learning Google Apps Script now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.