# Text\_field\_auto\_complete not working in IE?

**URL:** <https://www.ruby-forum.com/t/text-field-auto-complete-not-working-in-ie/57459>\
**Category:** Rails\
**Created:** [April 11, 2006, 7:13am UTC](https://www.ruby-forum.com/t/text-field-auto-complete-not-working-in-ie/57459 "2006-04-11T07:13:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@jeff](https://www.ruby-forum.com/u/jeff)\
**Post date:** [April 11, 2006, 7:13am UTC](https://www.ruby-forum.com/t/text-field-auto-complete-not-working-in-ie/57459/1 "2006-04-11T07:13:38Z")

</div>

Hi all,

I’m looking for some insight on why my text\_field\_with\_auto\_complete  
might not work in Internet Explorer. I’m using it in a fairly simple  
way, without much customization.

I’ve broken it down and made a test page at  
[http://realty.colemanation.org/houses/test](http://realty.colemanation.org/houses/test) which shows the behavior I’m  
having problems with. For me on Windows XP this page works fine in  
Firefox, with the autocomplete fields finding their values from the  
database and doing what they should. In Internet Explorer there’s no  
autocomplete behavior at all.

(Note: the Cities and Zips are in TX, “Austin” and “Houston” should  
work, as should “78731” and “77004”.)

I’m referencing a model called House which has the attributes ‘city’ and  
‘zip’.

My view:

\<%= start\_form\_tag(:controller =\> ‘houses’, :action =\> ‘find’) %\>

City \<%= text\_field\_with\_auto\_complete :house, :city, :size =\> 20  
%\>

  

Zip \<%= text\_field\_with\_auto\_complete :house, :zip, :size =\> 10  
%\>

  
\<%= end\_form\_tag %\>

My controller contains the relevant declarations:

```
auto_complete_for :house, :city
auto_complete_for :house, :zip

```

I’ve included the default Javascripts in my layout and everything seems  
in order. I haven’t overwritten any of the generated CSS or Javascript  
anywhere.

If anyone has any ideas how this works, I’d be grateful.

Thanks!  
Jeff C.man

---

<div class="post-metadata">

**Author:** ![jeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@jeff](https://www.ruby-forum.com/u/jeff)\
**Post date:** [April 11, 2006, 6:32pm UTC](https://www.ruby-forum.com/t/text-field-auto-complete-not-working-in-ie/57459/2 "2006-04-11T18:32:44Z")

</div>

Jeff C.man wrote:

> Hi all,
> 
> I’m looking for some insight on why my text\_field\_with\_auto\_complete  
> might not work in Internet Explorer. I’m using it in a fairly simple  
> way, without much customization.
> 
> I’ve broken it down and made a test page at  
> [http://realty.colemanation.org/houses/test](http://realty.colemanation.org/houses/test) which shows the behavior I’m  
> having problems with. For me on Windows XP this page works fine in  
> Firefox, with the autocomplete fields finding their values from the  
> database and doing what they should. In Internet Explorer there’s no  
> autocomplete behavior at all.
> 
> (Note: the Cities and Zips are in TX, “Austin” and “Houston” should  
> work, as should “78731” and “77004”.)
> 
> I’m referencing a model called House which has the attributes ‘city’ and  
> ‘zip’.
> 
> My view:
> 
> \<%= start\_form\_tag(:controller =\> ‘houses’, :action =\> ‘find’) %\>
> 
> City \<%= text\_field\_with\_auto\_complete :house, :city, :size =\> 20 %\>
> 
> Zip \<%= text\_field\_with\_auto\_complete :house, :zip, :size =\> 10 %\>
> 
> \<%= end\_form\_tag %\>
> 
> My controller contains the relevant declarations:
> 
> auto\_complete\_for :house, :city  
> auto\_complete\_for :house, :zip
> 
> I’ve included the default Javascripts in my layout and everything seems  
> in order. I haven’t overwritten any of the generated CSS or Javascript  
> anywhere.
> 
> If anyone has any ideas how this works, I’d be grateful.
> 
> Thanks!  
> Jeff C.man

Anyone have any insight about this? Why would  
text\_field\_with\_autocomplete work in Firefox but not in IE, all things  
being equal?

Jeff

---

<div class="post-metadata">

**Author:** ![jeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@jeff](https://www.ruby-forum.com/u/jeff)\
**Post date:** [April 11, 2006, 7:13pm UTC](https://www.ruby-forum.com/t/text-field-auto-complete-not-working-in-ie/57459/3 "2006-04-11T19:13:06Z")

</div>

Jeff  
\> Why would text\_field\_with\_autocomplete work in Firefox but not in  
IE, all

> things being equal?

I don’t know why it happens but I solved this problem in my latest app.  
by removing all explicit settings of the charset in before\_filters and  
RJS inline code.

Alain

---

<div class="post-metadata">

**Author:** ![jeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@jeff](https://www.ruby-forum.com/u/jeff)\
**Post date:** [April 11, 2006, 7:15pm UTC](https://www.ruby-forum.com/t/text-field-auto-complete-not-working-in-ie/57459/4 "2006-04-11T19:15:15Z")

</div>

Alain R. wrote:

> Jeff  
> \> Why would text\_field\_with\_autocomplete work in Firefox but not in  
> IE, all
> 
> > things being equal?
> 
> I don’t know why it happens but I solved this problem in my latest app.  
> by removing all explicit settings of the charset in before\_filters and  
> RJS inline code.
> 
> Alain

Interesting. Unless there’s something I’m not aware of, I have’t set  
the character set anywhere but my HTML layout.

Jeff

---

<div class="post-metadata">

**Author:** ![jeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@jeff](https://www.ruby-forum.com/u/jeff)\
**Post date:** [October 4, 2006, 11:19am UTC](https://www.ruby-forum.com/t/text-field-auto-complete-not-working-in-ie/57459/5 "2006-10-04T11:19:18Z")

</div>

Hmm, I having problems as well

Problem 1: The drop down list renders in IE correctly the first time,  
but then the second time, relies on the css i have for it. And since  
they are

- Problem 2: In IE, the drop down list renders about 15px off in both  
vertical and horizontal directions.
