Forum: Ruby on Rails RJS - Still not working in IE

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Lori O. (Guest)
on 2006-03-22 18:36
The previous thread on this topic got a little disjointed, so I thought
I'd summarize the issue again, in hopes that someone could help.  To
re-iterate, this rjs works in Firefox and Safari on Mac, and in Firefox
on Windows.  It fails, in IE on Windows.  The failure is that the second
page.replace_html seems to do nothing.

My environment is:

Rails 1.0 + RJS Plugin
Updated Javascripts to Scriptaculous 1.5.3 (for evalScripts support)
Monkeypatched in_place_editor to support evalScripts

This is the complete contents of the .rjs:

page.replace_html 'current_search_name_editor', :partial =>"search_name"
page.replace_html 'search_pane', :partial => "search"

My view contains:

<div class="SearchName" id="current_search_name_editor">
   <%= render :partial => "search_name" %>

<%= start_form_tag( {:action=> "master"}, {:id =>"conditions_form"} ) %>
<div id="search_pane">
   <%= render :partial => 'search' %>

The _search_name.rhtml partial:

<%= in_place_editor_field :current_search, :name, {}, {:script => true }

The _search.rhtml partial:

<ul id="condition_list">
  <p class="LabelText">
    <% if @current_search.conditions && @current_search.conditions.size
> 0 %>
    <%= render :partial => 'condition',
      collection => @current_search.conditions.sort { |b, a| <=>}
    <% else %>
    <% end %>

I would be grateful for any advice on figuring out what is going on.
Lori O. (Guest)
on 2006-04-12 01:03
(Received via mailing list)
On Wednesday, March 22, 2006, at 5:36 PM, Lori O. wrote:
>Monkeypatched in_place_editor to support evalScripts
>   <%= render :partial => "search_name" %>
><%= in_place_editor_field :current_search, :name, {}, {:script => true }
>    %>
>    <% else %>
>    <p>&nbsp;</p>
>    <% end %>
>  </p>
>I would be grateful for any advice on figuring out what is going on.

Just to bring closure to this thread, the problem here was bad HTML in
the _search.rhtml partial.  Using <p> inside the <ul>, but outside of
any <li> is invalid HTML, even though it works and looks fine in most
cases.  But it caused the problem in IE.  IE just refused to update the
part of the DOM containing this bad HTML.

Lori O.
This topic is locked and can not be replied to.