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


#1

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/

Thanks!


#2

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. :expressionless:

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/

Thanks!


#3

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