[Seaside] Disable a submit button

Derek Brans d.brans at shaw.ca
Thu Jul 24 11:53:51 CEST 2003


Nevin,
Why don't you put the shopping routine in an Session>>isolate: block.
That's exactly what it's for.

ShoppingTask>>go
    |shoppingCart purchase|
    self session isolate: [
        shoppingCart := self call: ShoppingComponent new.
        purchase := self call: (PurchaseComponent forCart: shoppingCart)]
    self call: (ReceiptComponent forPurchase: purchase).

A user can hit the back button until the puchase is complete.  Afterwards,
if they try to go back they are redirected to their receipt page and no
additional purchase is logged.


Derek Brans
Nerd on a Wire
Web design that's anything but square
http://www.nerdonawire.com
mailto: brans at nerdonawire.com
phone: 604.874.6463
toll-free: 1-877-NERD-ON-A-WIRE
----- Original Message -----
From: "Nevin Pratt" <nevin at smalltalkpro.com>
To: <seaside at lists.squeakfoundation.org>; <avi at beta4.com>
Sent: Thursday, July 24, 2003 10:27 AM
Subject: [Seaside] Disable a submit button


> I need to use Javascript to disable the submit button after it has been
> clicked.  But, as I understand it,  the Javascript that does this would
> need to know the button name, and the button name is dynamically
> assigned by Seaside.
>
> What is happening on my Checkout page is, after hitting the Payment
> Submit button, the user is occasionally hitting the "Back" button on the
> browser, then looking at stuff, then hitting the "Forward" button, and
> then clicking the Payment Submit button again.  This is resulting in
> multiple charges (I'm manually correcting them for now, so the customer
> doesn't see this error).  So, I need to disable the Payment button once
> it has been clicked (and *without* the page having to be re-rendered or
> reloaded).
>
> Anybody know how to do that?
>
> Nevin
>
> --
> Nevin Pratt
> Bountiful Baby
> http://www.bountifulbaby.com
> (801) 992-3137
>
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
>




More information about the Seaside mailing list