Topic: problem placing text in a div using ajax

I am using an ajax call to place text in a div. When the user clicks a link a method is run the queries the database for the text and then renders an rjs template. This template uses page.replace_html to to render a partial that renders the text in the div.

However instead of just getting the text place in the div, I am getting the entire result of the  ajax call.

i.e.
try { Element.update("details", "Create a details div and and rjs file to populate it with details for the todo item\n"); } catch (e) { alert('RJS error:\n\n' + e.toString()); alert('Element.update(\"details\", \"Create a details div and and rjs file to populate it with details for the todo item\n\");'); throw e }

instead of just

Create a details div and and rjs file to populate it with details for the todo item

Anyone ever encountered this? What is happening?

Re: problem placing text in a div using ajax

I answered this here.

Railscasts - Free Ruby on Rails Screencasts