Link_to_remote; how do I tweak the div to update?; Ajax on Rails

I'm trying to update a specific div section by trying to add some
embedded ruby code below. It's not liking it though. You see below
i'm trying to replace >>> :update => "msg_box>", <<< with >>> :update
=> "msg_box_<%= item.id %>", <<< but it's bad syntax or something. How
can I do this?

Here's my little Ruby on Rails webpage that uses Ajax:

<% for item in @my_items %>
<html>
  <head>
    <title>Ajax Demo</title>
    <%= javascript_include_tag "prototype" %>
  </head>
  <body>
    <div id="msg_box">
      <%= link_to_remote( "Item Details",
### normally its :update => "msg_box>",
                         :update => "msg_box_<%= item.id %>",
### you see in the line above i'm trying to update the div with id
"msg_box_1" for example...
                         :url =>{ :action => :get_details }) %>
    </div>
  </body>
</html>
<% end %>

Thanks for reading.

--Dan W.

You want the Rails mailing list.

···

On Nov 28, 2006, at 1520 , Dan W. wrote:

Here's my little Ruby on Rails webpage that uses Ajax:

--
Eric Hodel - drbrain@segment7.net - http://blog.segment7.net

I LIT YOUR GEM ON FIRE!

You want the Rails list.

http://groups-beta.google.com/group/rubyonrails-talk

However I will give you a hint. You can't put a <%= inside another
<%=. Two of those things in a row makes the templating engine grumpy.

···

On 11/28/06, Dan W. <wozniak.dan@gmail.com> wrote:

I'm trying to update a specific div section by trying to add some
embedded ruby code below. It's not liking it though. You see below
i'm trying to replace >>> :update => "msg_box>", <<< with >>> :update
=> "msg_box_<%= item.id %>", <<< but it's bad syntax or something. How
can I do this?

Here's my little Ruby on Rails webpage that uses Ajax:

>>>>>
<% for item in @my_items %>
<html>
  <head>
    <title>Ajax Demo</title>
    <%= javascript_include_tag "prototype" %>
  </head>
  <body>
    <div id="msg_box">
      <%= link_to_remote( "Item Details",
### normally its :update => "msg_box>",
                         :update => "msg_box_<%= item.id %>",
### you see in the line above i'm trying to update the div with id
"msg_box_1" for example...
                         :url =>{ :action => :get_details }) %>
    </div>
  </body>
</html>
<% end %>

<<<<<

Thanks for reading.

--Dan W.

--
Giles Bowkett
http://www.gilesgoatboy.org