Hi, I think the problem is probably that the script is executing before the browser has had a chance to add the 'input' to the DOM. Fixing it *may* be as easy as changing your script to use Function.defer[1]:
<script> (function(){ new Ajax.Autocompleter('input', 'suggest', '/suggest') }).defer(); </script> That defines an anonymous function, then schedules it for execution later (just a moment later) via Function.defer. More in the unofficial wiki: http://proto-scripty.wikidot.com/prototype:tip-scripting-dynamically-loaded-elements HTH, -- T.J. Crowder tj / crowder software / com On Oct 16, 3:50 pm, Alexander Mikhailian <[EMAIL PROTECTED]> wrote: > I have an Ajax.Autoupdater hooked onto an input box that is rewritten > by an Ajax.Updater that is called from within the autocomplete list. > Something like this: > > ---- > GET /index.html HTTP/1.0 > <script> > new Ajax.Autocompleter('input', 'suggest', '/suggest') > </script> > <div id="parent"> > <input id="input" type="text" /> > </div> > --- > GET /suggest HTTP/1.0 > <ul> > <li><a href="#" onclick="new Ajax.Updater('parent', '/ > update_input)'">Click here</a></li> > </ul> > ---- > > At the moment, the Autocompleter does not find the 'input' div at > all, after it has been rewritted by Updater. How can I make this work? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---