# Agile web Development with Rails section 9.3

**URL:** <https://www.ruby-forum.com/t/agile-web-development-with-rails-section-9-3/188883>\
**Category:** Rails\
**Created:** [May 19, 2010, 9:43pm UTC](https://www.ruby-forum.com/t/agile-web-development-with-rails-section-9-3/188883 "2010-05-19T21:43:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![angel-il6](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e47c2d/32.png) [@angel-il6](https://www.ruby-forum.com/u/angel-il6)\
**Post date:** [May 19, 2010, 9:43pm UTC](https://www.ruby-forum.com/t/agile-web-development-with-rails-section-9-3/188883/1 "2010-05-19T21:43:22Z")

</div>

Hello  
I am reading Agile Web D. with rails (third addition).  
And I need some help with it.  
I have reached chapter 9.3 (AJAX)

when I press on the add to cart button I get an error message.  
a real ugly one.

eventually, I downloaded the PDF version and copied the content of the  
files but it did not help.

I have looked but could not find the problem.  
Please give me a hand.

the files of this application are at:  
Download link: [http://rapidshare.com/files/389266124/chapter-9.tar.gz](http://rapidshare.com/files/389266124/chapter-9.tar.gz)

[http://localhost:3000/store](http://localhost:3000/store)

I think that the error is written in javascript  
and this is it:

* * *

try {  
Element.update(“cart”, "\n\n\<div class="cart-title"\>Your  
Cart\n

\n \n\n\n\n\n \<tr  
id="current\_item"\> \n\n\n\n\n\n\n\n

\n \n \n\n\n\n \n \n \n \n\n

| 7× | Pragmatic Project Automation | $209.65 |
| Total | $209.65 |

\n\n

\n"); $("current\_item").visualEffect("highlight", {"endcolor":"#114411","startcolor":"#88ff88"}); } catch (e) { alert('RJS error:\n\n' + e.toString()); alert('Element.update(\"cart\", \"\\n\\n
Your Cart
\\n\\n \\n\\n\\n\\n\\n \\n\\n\\n\\n\\n\\n\\n\\n \\n \\n \\n\\n\\n\\n \\n \\n \\n \\n\\n

|
| |
| 7× | Pragmatic Project Automation | $209.65 |
| Total | $209.65 |

\\n\\n

\\n\");\n$(\"current\_item\").visualEffect(\"highlight\", {\"endcolor\":\"#114411\",\"startcolor\":\"#88ff88\"});'); throw e }
* * *

Thanks  
Angel
