I’m a complete novice when it comes to web development, but I’m going
through the examples in the 2nd edition of the Agile Web D.
With Rails book and have hit a snag.
I’ve added the AJAX code to update the shopping cart immediately upon
pressing Add To Cart on one of the line items. However, as soon as I
click Add To Cart a download menu pops up. It does not seem to matter
if I actually download the file or if I cancel – I can refresh the
page and the shopping cart does indeed get updated.
The name of the file to be downloaded is a large number (e.g. 300000000
) that seems to be tied to the item I select. The downloaded file
contents is as follows:
try {
Element.update(“cart”, "<div class=“cart-title”>Your
Cart\n
4× | \nPragmatic Unit Testing (C#) | \n $111.00\n\n \n \nTotal | \n $111.00\n \n
4× | \nPragmatic Unit Testing (C#) | \n $111.00\nTotal | \n $111.00\n \n
Any idea what is happening here, and more importantly, how to fix it?
I should mention that even though the book recommends downloading the
Edge Rails version, I am using the current version that comes with
InstantRails. I suppose that could have something to do with it.