Forum: Ruby on Rails text_field_auto_complete not working in IE?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
59ea1b450935b9d70abfec4186b7a4d5?d=identicon&s=25 Jeff Coleman (progressions)
on 2006-04-11 07:13
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 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') %>
	<p>City <%= text_field_with_auto_complete :house, :city, :size => 20
%></p>
	<p>Zip <%= text_field_with_auto_complete :house, :zip, :size => 10
%></p>
<%= 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 Coleman
59ea1b450935b9d70abfec4186b7a4d5?d=identicon&s=25 Jeff Coleman (progressions)
on 2006-04-11 18:32
Jeff Coleman 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 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') %>
> 	<p>City <%= text_field_with_auto_complete :house, :city, :size => 20
> %></p>
> 	<p>Zip <%= text_field_with_auto_complete :house, :zip, :size => 10
> %></p>
> <%= 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 Coleman


Anyone have any insight about this?  Why would
text_field_with_autocomplete work in Firefox but not in IE, all things
being equal?

Jeff
0091f92762685860109bbcb02edfdf27?d=identicon&s=25 Alain Ravet (Guest)
on 2006-04-11 19:13
(Received via mailing list)
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
59ea1b450935b9d70abfec4186b7a4d5?d=identicon&s=25 Jeff Coleman (progressions)
on 2006-04-11 19:15
Alain Ravet 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
525128e48ca2b4c7fb6176ea166fccfd?d=identicon&s=25 Eric G. (gotskill10)
on 2006-10-04 11:19
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 <li>, i dont know how to have the "onhover" effect.

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

Anybody experience these and knows how to fix it?
This topic is locked and can not be replied to.