Internet Explorer "quirk" of the day

I happilly deployed the latest version of my application to our test server last night and posted a message saying “here it is - please test away”

I come in to work this morning and see a mail saying “when you click lots of the links you get an RJS error”. Weird - I fire up Safari and it works fine. I fire up Internet Explorer 7 - RJS errror. But only on some of the links. I try a different machine with IE6. Same thing. Try in Firefox. All OK.

After lots of wasted time I find out what the problem is. I have this in my page:

  <p id="new_staff_assignment">   <%= link_to_remove 'assign a new staff member', :url => new_staff_assignment_path, :before => show_progress_indicator, :complete => hide_progress_indicator %>   </p>

which fires the following bit of RJS:

  page.replace_html 'new_staff_assignment', :partial => 'new'  page.visual_effect :highlight, 'new_staff_assignment'

As I say - works fine in Safari/Camino/Firefox but not in IE6 or IE7.

But then I changed my page to:

  <div id="new_staff_assignment">  <%= link_to_remove 'assign a new staff member', :url => new_staff_assignment_path, :before => show_progress_indicator, :complete => hide_progress_indicator %>   </div>

and what do you know? It works fine.

I guess a P tag doesn’t have an innerHtml property whereas a div does.

This entry was posted on Friday, April 13th, 2007 at 9:37 am and is filed under Designing Great Software, Ruby on Rails and Software Development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

One Response to “Internet Explorer "quirk" of the day”

  1. Paul Philippov Says:

    Thanks a lot for the tip. I stuck with the same issue today. You saved me an hour of research =)

Leave a Reply