How do I include global styles/javascript in HTML files displayed as dialogs? -


i developing google app script project used right within google sheet, html files dialogs. project mix of .gs files html files data entry, etc. trying use methodology explained here:

https://developers.google.com/apps-script/guides/html/best-practices#separate_html_css_and_javascript

to create global javascript , css modules can include in html files rather cutting , pasting inline code on place. useful data-saving routines capture form data, serialize it, save sheets via methodology outlined here (and many other places): http://railsrescue.com/blog/2015-05-28-step-by-step-setup-to-send-form-data-to-google-sheets/.

the problem having trying call "include" statement html files, namely, lines like:

<?!= include('javascript'); ?> 

it doesn't work when create menu on spreadsheet display html file dialog -- text of include line shows literal output on dialog, , code not appear getting included (not in scope).

i know google example pages delpoyed via web app, i'd use html files dialogs right inside spreadsheet (e.g. menu or sidebar) -- feels nice , tidy me. if can't includes work, code base going nightmare , really, hard standardize css across whole app. don't want cutting , pasting time.

so, secret behind <?! tag, , why won't work in html files when called dialogs? clear lines different get-go (maybe not in bad way, don't work), google scripting console displays lines oddly, depicted in screenshot below:

enter image description here

any how share code in html files used in-sheet dialogs appreciated!

thanks,

sutekh137

please try adding:

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?> 

more information can found in adding style sheets.


Comments

Popular posts from this blog

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -