View Rahoul Baruah's profile on LinkedIn Basecamp project management and collaboration

The blog of Rahoul Baruah from 3hv Ltd

What's going on?

My name is Rahoul Baruah (aka Baz) and I'm a software developer in Leeds (England).

This is a log of things I've discovered while writing software in Ruby on Rails. In other words, geek stuff.

However, I've decided to put this blog on ice - I would ask you to check out my business blog here (or subscribe here).

13 April, 2007

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.

1 comment:

Anonymous said...

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

eXTReMe Tracker