# Ajax Confusion

**URL:** <https://www.ruby-forum.com/t/ajax-confusion/125402>\
**Category:** Rails\
**Created:** [January 8, 2008, 9:39pm UTC](https://www.ruby-forum.com/t/ajax-confusion/125402 "2008-01-08T21:39:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JonathanB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8e8cbc/32.png) [@JonathanB](https://www.ruby-forum.com/u/JonathanB)\
**Post date:** [January 8, 2008, 9:39pm UTC](https://www.ruby-forum.com/t/ajax-confusion/125402/1 "2008-01-08T21:39:19Z")

</div>

Ok, there’s two versions to this question, the short one and the long  
one.

Short Version: Is there anything special you have to do to get Ajax to  
work in Rails on IE that you don’t have to do to get it work in FF?

Long Version: I have a form on which you can list contacts for an  
account. The idea is to do it in Ajax. They click “Add new contact”, a  
form appears above the “Add new contact” link where you can input the  
contact information. I have tested this in IE 6 and FF 2.0.0.10. It  
works correctly in FF, but clicking the link in IE 6 does not do  
anything. No error, no form, no nothing. Anybody encountered anything  
like this before? My google-fu turned up an error about updating  
tables, but I’m using divs, not a table so that shouldn’t be an issue,  
right?

---

<div class="post-metadata">

**Author:** ![JonathanB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8e8cbc/32.png) [@JonathanB](https://www.ruby-forum.com/u/JonathanB)\
**Post date:** [January 9, 2008, 3:18pm UTC](https://www.ruby-forum.com/t/ajax-confusion/125402/2 "2008-01-09T15:18:16Z")

</div>

Realized I had some missing information. This rails app is running on  
Instant Rails 1.7. Here is the code snippet from the view calling the  
partial

\<%= link\_to\_remote( "Create new contact", :update =\> 'newcontact', :url =\> { :action =\> :new, :controller =\> 'contact' }, :position =\> 'before' ) %\>

---

<div class="post-metadata">

**Author:** ![JonathanB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8e8cbc/32.png) [@JonathanB](https://www.ruby-forum.com/u/JonathanB)\
**Post date:** [January 9, 2008, 9:07pm UTC](https://www.ruby-forum.com/t/ajax-confusion/125402/3 "2008-01-09T21:07:36Z")

</div>

Not sure why it wouldn’t work in IE, but I’m wondering if you need Ajax  
at all. Instead of link\_to\_remote, you could use link\_to\_function and  
avoid the trip to the server just to display a form. You’ll either need  
to a hidden div that contains the form (which is displayed when the link  
is clicked) or “build” the DOM elements using the Prototype builder.
