:complete => "appear('<%= dom_id(person.id)box %>','<%=
dom_id(person.id) %>')" %>
...unfortunatly, that doesn't work: syntax error, unexpected $end,
expecting ')' and so on.
how has the js call to look like? i hope u r able to help me.
here s the code snippet:
<% unless person.about == "" %>
<%= link_to_remote "mehr",
:url=>{:action => "showMore"},
:update => dom_id(person.id),
:complete => "appear('<%= dom_id(person.id)box %>','<%=
dom_id(person.id) %>')" %>
<% end %>
<div id="<%= dom_id(person.id) %>box">
<div id="<%= dom_id(person.id) %>"></div>
</div>
--
Posted via http://www.ruby-forum.com/.
>
> hi. i want do call my js method "appear(box1, box2)" with rails
> created,
> dynamic ids for my div tags -->
>
> :complete => "appear('<%= dom_id(person.id)box %>','<%=
> dom_id(person.id) %>')" %>
that string is just a string (ie it's not put through erb)
"appear('#{dom_id(person.id)}box','#{dom_id(person.id)')"
should do the trick
Fred
sorry for disturbing again: now the produced html code is ok, but my
script isn't called. i use this script on an other site, thus i'm sure
the script is ok. can u think about a reason for that problem.
Use firebug to see what's going on (eg set a breakpoint in your appear
function).
Fred