# Observe\_field on select in IE

**URL:** <https://www.ruby-forum.com/t/observe-field-on-select-in-ie/145751>\
**Category:** Rails\
**Created:** [August 13, 2008, 5:47pm UTC](https://www.ruby-forum.com/t/observe-field-on-select-in-ie/145751 "2008-08-13T17:47:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![scott](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://www.ruby-forum.com/u/scott)\
**Post date:** [August 13, 2008, 5:47pm UTC](https://www.ruby-forum.com/t/observe-field-on-select-in-ie/145751/1 "2008-08-13T17:47:57Z")

</div>

I’m using observe\_field on a ‘select’ and it works beautifully in FF  
and Safari. It doesn’t work at all in IE7.

Here’s a snippet:

\<%= f.select :project\_id, addresses\_array %\>

\<%= observe\_field ‘listing\_project\_id’, :update =\> :address, :with  
=\> :listing\_project\_id,  
:on =\> “onselect”, :url =\> { :action =\> :find\_address } %\>

Any ideas why it doesn’t work in IE7? I’ve google’d a lot and there  
don’t seem to be much talk about this which leads me to believe I  
might being doing it wrong. I’m using Rails 2.1.0.

Thanks for the help!

-scott

---

<div class="post-metadata">

**Author:** ![scott](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://www.ruby-forum.com/u/scott)\
**Post date:** [August 13, 2008, 5:52pm UTC](https://www.ruby-forum.com/t/observe-field-on-select-in-ie/145751/2 "2008-08-13T17:52:06Z")

</div>

Apparently IE doesn’t like what I’m returning in my js.erb file.

If I only put the string ‘foo’ or ‘

foo

’ in there, it works. I  
had some … tags which it doesn’t like and won’t render.

On Aug 13, 2008, at 9:40 AM, Scott wrote:

> Any ideas why it doesn’t work in IE7? I’ve google’d a lot and there  
> don’t seem to be much talk about this which leads me to believe I  
> might being doing it wrong. I’m using Rails 2.1.0.
> 
> Thanks for the help!
> 
> -scott

–  
Scott Gose  
removed\_email\_address@domain.invalid
