|
Why store the cart on the server? why not locally? Maybe some sort of
iframe hack would let you download the file and attach an event on
completion but I'd think that clearing the cart when they click the
download link would be good enough. Only disadvantage would be if they
clicked cancel they'd have to refill the cart to try again, but you can
only account for so much carelessness on behalf of the user :) See
http://ecosmear.com/relay/ Colin Walter Lee Davis wrote: The cart loads at page load and then is continuously updated without screen refresh. It is backed by the database, and that database is read by download.php to get its list of files to download. If download is successful in contacting the secure WEBDAV repository with all the big files in it (the database is just a proxy), downloading the actual files and mashing them into a zip -- then it clears the cart.But since I am just linking to (what appears to the browser as) a plain zip file for download, and that zip file doesn't exist until the download script has finished its business, I don't see how I can tell the cart to update on screen after the download has finished. It's tricky. Walter On Mar 19, 2007, at 5:14 PM, Gareth Evans wrote:On your download link, apply an onclick handler as well as a href- the onclick can clear your on-screen shopping cart. When is the on-screen list being loaded? at page load, ie: the rest of the site isn't ajax based? Or does the cart remain onscreen at all times with no refresh. <a href="" > (inline handlers are bad) This will cause the cart to clear, then the user will navigate to downloadlink.php. If you didn't want them to download, you could return false. If you attach the event with Event.Observe you have to use Event.Stop(e) though Hope this helps Gareth On 3/20/07, Walter Lee Davis <[EMAIL PROTECTED]> wrote: --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~--- |
- [Rails-spinoffs] Re: Update Cart after download Colin Mollenhour
- [Rails-spinoffs] Re: Update Cart after download Walter Lee Davis
- [Rails-spinoffs] Re: Update Cart after download Colin Mollenhour
- [Rails-spinoffs] Re: Update Cart after downl... Walter Lee Davis
- [Rails-spinoffs] Re: Update Cart after d... Gareth Evans
- [Rails-spinoffs] Re: Update Cart af... Walter Lee Davis
