I have a form that’s wrapped in a div with id content:
<div id="content">
<%= render :partial => 'shared/signup' %>
</div>
shared/_signup.html.erb contains:
<%= form_tag sign_me_up_path, :remote => true do %>
...
<% end %>
If the user submits the form and there’s errors, I render create.js.erb which contains only:
$("#content").html("<%= escape_javascript(render :partial => 'shared/signup') %>");
With internet explorer this simply removes all of the content in #content, but it works great in all other browsers. I’d appreciate any help / insight.
I’m using the same pattern- remote form submission, javascript response which renders a partial and populates the html of a div using Jquery (1.4.4). I saw the same behavior in IE, but it turned out it was due to a typo in the HTML partial.
The other browsers were just nicer about handling an unclosed span tag. I suspect you’ve got a similar issue- validate the rendered HTML of your partial.