RJS/Ajax insert_html problem

I’m getting weird results using an Ajax call to render a partial. My
RJS is getting executed properly as nearly as I can tell but instead
of rendering the partial, it renders the Javascript that should be
getting executed. Here’s what’s in the RJS file:

page.insert_html :bottom, :product_div, :partial => ‘test/
test_partial’

I tried a simpler test with:

page.insert_html :bottom, :product_div, ‘test’

but got similar results. The div element with id “product_div” gets
updated with:

try { new Insertion.Bottom(“product_div”, “test”); } catch (e)
{ alert(‘RJS error:\n\n’ + e.toString()); alert(‘new
Insertion.Bottom(“product_div”, “test”);’); throw e

Seems to me like this is the code that should be executed to put the
word “test” in the div. The Prototype libraries seem to be loaded just
fine and the Ajax call goes to the right place and executes properly -
I just can’t see why it’s doing this. Any ideas on how to go about
debugging this? Thanks!

On 2 Jul 2008, at 18:16, Matt W. wrote:

page.insert_html :bottom, :product_div, ‘test’

but got similar results. The div element with id “product_div” gets
updated with:

try { new Insertion.Bottom(“product_div”, “test”); } catch (e)
{ alert(‘RJS error:\n\n’ + e.toString()); alert(‘new
Insertion.Bottom(“product_div”, “test”);’); throw e

How are you invoking the ajax stuff ( ie are you using the :update
option (if so, don’t)

Fred

Frederick,

You’re a genius. Thanks, that was it.

On Jul 2, 11:18 am, Frederick C. [email protected]