title: Rails3 responding with js after json update
body: <p>using <a href="http://blog.bernatfarrero.com/in-place-editing-with-javascript-jquery-and-rails-3/" rel="nofollow">http://blog.bernatfarrero.com/in-place-editing-with-javascript-jquery-and-rails-3/</a></p>
  
  <p>The gem uses json to update, but how can I trigger my update.js.erb to update the different parts of my pages?</p>
  
  <p>EDIT
  Using this in an invoice page.  every item in the invoice has a price field that can be updated with best_in_place.</p>
  
  <p>I need to update the Total Price for line item and amount due for invoice only after field has been updated successfully.</p>
  
  <p>Ended up with something like:</p>
  
  <pre><code> respond_to do |format|
          if @item.update_attributes(params[:item])
            format.html { redirect_to order_url(@item.order_id), :notice =&gt; "Successfully updated item." }
            format.js {  }
            format.json { head :ok } 
  </code></pre>
  
  <p>Edited best_in_place.js line #175</p>
  
  <pre><code>loadSuccessCallback : function(data) {
      this.element.html(data[this.objectName]);
          // Binding back after being clicked
      $(this.activator).bind('click', {editor: this}, this.clickHandler);
      if(this.objectName == "item") $.getScript('update.js'); // If its an item, call update.js.erb 
    },
  </code></pre>