Request dialog confirmation before callback

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Request dialog confirmation before callback

dtrussardi@tiscali.it
Ciao,

        i have the following code:
       
        html anchor

                onClick: ( html jQuery ajax callback: [ masterView increaseVoce:  aVoceCompilata ]);

                onClick: (self  updateRow: anIndexRow with: aVoceCompilata on: html nominative: aNominative);

                with: [ html image
                                url:  DTRFileLibrary / #greenupGif ;
                                altText: 'Incrementa';
                                title:'Incrementa'].

        Now i need ( in some case ) to to display  a confirm dialog to the user
       
        and  perform the callback block  only if the user answer OK.

       
        I open the dialog with:

                html jQuery ajax script:[ :script |  script confirm: 'It's right ?'];

        but i don't understand how i can intercept the answer.

        Thanks for considerations,

                Dario_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Request dialog confirmation before callback

jelena

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Request dialog confirmation before callback

Paul DeBruicker
In reply to this post by dtrussardi@tiscali.it
Hi Dario,

Just make the onClick: handler like this:


onClick: ( html jQuery ajax callback: [ masterView increaseVoce:  aVoceCompilata ];
                                        onSuccess: (self  updateRow: anIndexRow with: aVoceCompilata on: html nominative: aNominative);
                                        confirm:'It's right ?');


And then you'll save updating the row too if they don't confirm.  


Hope this helps

Paul


dtrussardi@tiscali.it wrote
Ciao,

        i have the following code:
       
        html anchor

                onClick: ( html jQuery ajax callback: [ masterView increaseVoce:  aVoceCompilata ]);

                onClick: (self  updateRow: anIndexRow with: aVoceCompilata on: html nominative: aNominative);

                with: [ html image
                                url:  DTRFileLibrary / #greenupGif ;
                                altText: 'Incrementa';
                                title:'Incrementa'].

        Now i need ( in some case ) to to display  a confirm dialog to the user
       
        and  perform the callback block  only if the user answer OK.

       
        I open the dialog with:

                html jQuery ajax script:[ :script |  script confirm: 'It's right ?'];

        but i don't understand how i can intercept the answer.

        Thanks for considerations,

                Dario_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside