Forum: Ruby on Rails -text_field_with_auto_complete- browser problems

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.
B5feafb2c66fdff60029deda63f99f93?d=identicon&s=25 dweinand (Guest)
on 2007-01-08 14:59
(Received via mailing list)
Hello,
i'm using the following code in my rails app. works like a charm on IE.
but on FF no autocomplete popup is displayed. can somebody help?

rails code:
 <p>
    <%= text_field_with_auto_complete :person, :nachname, {},
    {
     :select => 'name',
     :after_update_element =>
       "function(element,value) " +
       "{ " +
       remote_function(:update=>'Kundendaten',
         :url=>{:action=>:update_kundendaten},
         :with=>"'adr_id='+value.id") + ";" +
       "}"
    }      %>
 </p>

html result:
<p>
   <style>                div.auto_complete {
             width: 350px;
             background: #fff;
           }
      div.auto_complete ul {
             border:1px solid #888;
             margin:0;
             padding:0;
             width:100%;
             list-style-type:none;
           }
     div.auto_complete ul li {
             margin:0;
             padding:3px;
           }
     div.auto_complete ul li.selected {
             background-color: #ffb;
           }
     div.auto_complete ul strong.highlight {
             color: #800;
             margin:0;
             padding:0;
           }
</style>

<input id="person_nachname" name="person[nachname]" size="30"
type="text" />
<div class="auto_complete" id="person_nachname_auto_complete"></div>

<script type="text/javascript">
//<![CDATA[
var person_nachname_auto_completer = new
Ajax.Autocompleter('person_nachname', 'person_nachname_auto_complete',
'/vermietung/auto_complete_for_person_nachname',
{afterUpdateElement:function(element,value) { new
Ajax.Updater('Kundendaten', '/vermietung/update_kundendaten',
{asynchronous:true, evalScripts:true, parameters:'adr_id='+value.id});},
select:'name'})
//]]>
</script>
</p>
This topic is locked and can not be replied to.