After googling for a bit I now believe that you simply *cannot* put erb 
tags in a .js file.

I managed to get around this by rewriting the DOM as html and putting it 
in a partial, such that the (different) onclick that was supposed to 
call a js function with erb in it now calls an erb function with a js 
function in it...

<span onclick="<%= remote_function(:update => "dropinner",
        :url => { :action=>:rendpart, :part=>"addmenu" },
        :success => "new Effect.BlindDown('dropmenu')")%>">

but if anyone knows how to do what I have in the OP, please lemme know 
for future reference.

Also, is there a way to call "render" from within remote_function(:url 
=> {}) so I can skip the controller function that calls render?

       def rendpart
                  render :partial => params[:part]
       end
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to