# RJS error on IE only: will trade (virtual) beer for (real) a

**URL:** <https://www.ruby-forum.com/t/rjs-error-on-ie-only-will-trade-virtual-beer-for-real-a/81448>\
**Category:** Rails\
**Created:** [January 9, 2007, 3:59am UTC](https://www.ruby-forum.com/t/rjs-error-on-ie-only-will-trade-virtual-beer-for-real-a/81448 "2007-01-09T03:59:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 9, 2007, 3:59am UTC](https://www.ruby-forum.com/t/rjs-error-on-ie-only-will-trade-virtual-beer-for-real-a/81448/1 "2007-01-09T03:59:20Z")

</div>

So I’m doing something I’ve done a million times before with some RJS  
flavored code, and for some reason it’s not working on IE. I’ve  
Googled the problem and found only stuff that’s not terribly relevant  
to this problem. Help is much appreciated; I’ve pulled out what’s left  
of my hair over this one. Here’s the deal:

The code is working just swell on Firefox, but on IE it gets an error  
that says:

RJS error: Object error

… followed by another alert with a bunch of escaped javascript.

The RJS file is very simple:

page[:shebang].replace\_html :partial =\> ‘add\_description’, :object  
=\>@location  
page[:shebang].visual\_effect :blindDown

Even having the partial just render static text, that error pops up.  
Further, there’s no tables in the partial, which I know can be a  
problem (IE protects TR elements, I gather).

This is not something difficult, and yet I’m getting the error. The  
only thing I can think of is that we’re writing to a div with a Google  
Map in it using the Cartographer plug-in, but I don’t see anything that  
could conflict … and when I removed it I still got the error.

I _can_ call a basic JS function instead–no errors. And I can even do  
a homegrown document.getElementById(‘shebang’).innerHTML = “blah”;  
sort of thing to write to the div, and that works fine. The problem  
seems to be with the replace\_html bit.

If it helps, the dev site is at:

[http://ics.umflint.edu:3103/main/](http://ics.umflint.edu:3103/main/)

Thanks!

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 16, 2007, 3:34am UTC](https://www.ruby-forum.com/t/rjs-error-on-ie-only-will-trade-virtual-beer-for-real-a/81448/2 "2007-01-16T03:34:36Z")

</div>

Yup, me too.

Works fine with: Firefox Mac, Firefox Win, Camino Mac, Safari, etc.  
Breaks: IE6/Win (not sure about IE7)

I’m trying to update a select control’s items - apparently IE doesn’t  
like that.

Pathetic. 😑

removed\_email\_address@domain.invalid wrote:

> So I’m doing something I’ve done a million times before with some RJS  
> flavored code, and for some reason it’s not working on IE. I’ve  
> Googled the problem and found only stuff that’s not terribly relevant  
> to this problem. Help is much appreciated; I’ve pulled out what’s left  
> of my hair over this one. Here’s the deal:
> 
> The code is working just swell on Firefox, but on IE it gets an error  
> that says:
> 
> RJS error: Object error
> 
> … followed by another alert with a bunch of escaped javascript.
> 
> The RJS file is very simple:
> 
> page[:shebang].replace\_html :partial =\> ‘add\_description’, :object  
> =\>@location  
> page[:shebang].visual\_effect :blindDown
> 
> Even having the partial just render static text, that error pops up.  
> Further, there’s no tables in the partial, which I know can be a  
> problem (IE protects TR elements, I gather).
> 
> This is not something difficult, and yet I’m getting the error. The  
> only thing I can think of is that we’re writing to a div with a Google  
> Map in it using the Cartographer plug-in, but I don’t see anything that  
> could conflict … and when I removed it I still got the error.
> 
> I _can_ call a basic JS function instead–no errors. And I can even do  
> a homegrown document.getElementById(‘shebang’).innerHTML = “blah”;  
> sort of thing to write to the div, and that works fine. The problem  
> seems to be with the replace\_html bit.
> 
> If it helps, the dev site is at:
> 
> [http://ics.umflint.edu:3103/main/](http://ics.umflint.edu:3103/main/)
> 
> Thanks!

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 17, 2007, 1:29pm UTC](https://www.ruby-forum.com/t/rjs-error-on-ie-only-will-trade-virtual-beer-for-real-a/81448/3 "2007-08-17T13:29:40Z")

</div>

These messages are just javascript-alerts. Just move from development  
to production environment.
