Ajax.Autocompleter is not a constructor

Hi Rails,

I am having trouble setting up an autocomplete text field. Using rails
1.0.0
and just trying to copy the simple scriptaculous demo
(http://demo.script.aculo.us/ajax/autocompleter) fails. My view and
controller
are set up the same way.

In firefox 1.0.4 (and safari, don’t remember the version) I get the
Ajax.Autocompleter error in the javascript console when loading the
page. Here
is the code that text_field_with_auto_complete generates for me:

I made no changes to the public/javascripts.

Any suggestions? Thanks,
–Dean

Take your time, take your chances
[3278.7 km, 273.4] Apparent Rennerian

It matters not how strait the gate, / How charged with punishments the
scroll,
I am the master of my fate: / I am the captain of my soul. –
Invictus –
– William E
Henley –

You probably need to include controls.js in your layout or view template
in addition to prototype and effects:

<%= javascript_include_tag “prototype”, “effects”, “controls” %>

Anders wrote:

You probably need to include controls.js in your layout or view template
in addition to prototype and effects:

<%= javascript_include_tag “prototype”, “effects”, “controls” %>

sheepish grin Yep that was it. Layouts make it easy to forget
things.
Thank you.

–Dean

Take your time, take your chances
[3278.7 km, 273.4] Apparent Rennerian

It matters not how strait the gate, / How charged with punishments the
scroll,
I am the master of my fate: / I am the captain of my soul. –
Invictus –
– William E
Henley –