Thanks for the suggestion Heiko. I've done something similar to what you propose in a prior project - send the entire table to the browser at the start with the 'status' column blank then open a websocket that sends the status value for each row to the browser and have a little javacript that plugs in the status value in the appropriate row. I was hoping to avoid that with this project because it seems like overkill for such a simple project, but the eventsource method in the link that you sent looks much simpler to implement so I'll experiment with that.
I tried 'wrapping' the list of calls to the various templates in a $c->delay(@list); structure, this causes the first template (table) to execute in its entirety but it never starts the second entry in the list (even though I see the result from the very last statement in the sub in $list[0].) Is there some magic that I need to invoke to make delay start the next item in the list? On Thursday, October 13, 2016 at 5:38:56 PM UTC-4, Heiko Jansen wrote: > > I´m not sure if I understand your workflow correctly but how about this: > for every row processed send a small JSON documents to the browser which > contains information on the worksheet, row and row status and then have > some JavaScript code in the browser assemble and update the correct HTML > table (inserting another row)? > I´d probably render a skeleton HTML page as response to the upload of the > Excel file, then start a new AJAX request from that page which triggers the > processing of the spreadsheet uploaded previously and receives the > processing status as "server-sent events" (cf. > http://www.w3.org/TR/eventsource/ > <http://www.google.com/url?q=http%3A%2F%2Fwww.w3.org%2FTR%2Feventsource%2F&sa=D&sntz=1&usg=AFQjCNGAvtrgFc5cjVSRTO_mUCfhgUdl-A> > ). > > Heiko > -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
