[Seaside] immediate display alert to user while Ajax request

jtuchel at objektfabrik.de jtuchel at objektfabrik.de
Fri Jul 21 13:44:57 UTC 2017


Sabine,

fur such things, I set up an instance  variable in the component with 
the text to display, for off a process that does the actual processing 
and updates the variable with the text reperesenting the progress.

On the client side, I setup a timeout that will issue an ajax callback 
back to the server every x smsecs and. The server will answer the 
current string. The Javascript code can then update the "please wait" 
dialog, or, in your case, open an alert if the text has changed from 
last time.

I am not near an image right now, so I cannot provide sample code...

Joachim



Am 21.07.17 um 15:39 schrieb Sabine Manaa:
> Hi,
>
> while generating reports, I want to show the user some kind of 
> information about the status of the report generation. After each 
> step, I want to alert him about the status. Alert is only an example 
> for reducing the problem here.  will use the mdlSnackbar for it.
>
> When he clicks on "create reports", an alert should show before the 
> first step and then after each next step. In my reduced example below, 
> the alerts are all shown at the end, AFTER the script.
>
> How can I do this, I don't get it and could need some help...
> Sabine
>
> reducedExample>>html mdlButton
> onClick: (html jQuery ajax
> script: [ :script |
> self session reportModel: RKAReportHead new.
> script alert: 'Reisekosten' inspect.
> RKAPDFWriter new createCostReports: self session.
> script alert: 'Belege' inspect.
> RKAPDFWriter new createReceiptReports:  self session.
> script alert: 'Fahrten' inspect.
> RKAPDFWriter new createVehicleReports:  self session.
> script alert: 'Buchungen' inspect.
> RKAPDFWriter new createBookingReports:  self session ]);
> with: 'test'
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


-- 
-----------------------------------------------------------------------
Objektfabrik Joachim Tuchel          mailto:jtuchel at objektfabrik.de
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg                  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/seaside/attachments/20170721/e8eb533e/attachment.html>


More information about the seaside mailing list