On Wednesday, March 22, 2006, at 5:36 PM, Lori Olson
wrote:>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" %>
></div>
>
><%= start_form_tag( {:action=> "master"}, {:id
=>"conditions_form"} ) %>
><div id="search_pane">
> <%= render :partial => ''search'' %>
></div>
>...
>
>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| a.id
<=>
>b.id}
> %>
> <% else %>
> <p> </p>
> <% end %>
> </p>
></ul>
>
>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 Olson
http://blog.dragonsharp.com
--
Posted with http://DevLists.com. Sign up and save your mailbox.