google apps script - HTML Loading Messages -


is there way pass value html page while server side function running?

in past when using ui service, in function create label in ui like:

app.createlabel('working, hang on!'); 

and appear while script running, letting them know script running. when got parts of script able update/create new message like:

app.createlabel('halfway there, hold on.'); 

or

app.createlabel('fetched values, processing them'); 

etc., tell them if script running long time. added bonus update them on direction script taking, example if room booking script found first room unavailable, pass message such as:

app.createlabel('first room busy, checking other rooms'); 

and on, , forth.

is there way html service? seems options success , failure handlers updating html page when function complete, don't seem want, it's not 'real time' message.

you can still use ui.alert() in sheets , docs, , sheets has toast().

to keep message within sidebar or dialog you've created using html service, can set separate poller function on client, retrieve messages server every once in while. long-running function queue message via function call on server, picked poller on next cycle, , displayed user.

see how poll google doc add-on example of poller.


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -