Crap, sent previous by accident.

First, make sure you're running Firebug with FF so you can see if
any JS errors are causing your script(s) to exit.

Second, in my simple test case I have the following:

<%= link_to_remote 'Get another opinion',
  :url => {:action =>'opinion', :method => 'get'}, :update =>
'things/opinion' %>
<%= render :partial => 'opinion' %>

:: and the controller looks like:

  def opinion
    render :update do |page|
      page.replace 'opinion', :partial => 'opinion'
    end
  end

:: which reloads this simple partial:

<div id="opinion">
  showing an opinion on <%= Time.now %>
<script type="text/javascript">
  alert("hey!");
</script>
</div>

Each click on that "Get another opinion" link changes the partial view
(time changes) and JS executes.

Hopefully that's some useful food for thought :-)

-- 
Hassan Schroeder ------------------------ [email protected]
twitter: @hassan

--~--~---------~--~----~------------~-------~--~----~
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