I have an <input> element with id 'searchtickets' linked to Autocompleter so that potential search results are returned as the user types characters in. Updater is then called to update a <div> element with id 'dmain' based on that search result. So far I have the following javascript:
Event.observe(window,'load',function() { new Ajax.Autocompleter('searchtickets','searchticketres','data/searchtickets.php',{minChars:3}); Event.observe('searchtickets','change',function() { new Ajax.Updater('dmain','data/foo.php',{ parameters:$('searchtickets').serialize() }); }); }); 'data/foo.php' simply prints out the value of the POSTed parameters (for testing purposes). The HTML, for completeness is: <input type='text' id='searchtickets' name='t' size='10' /> <div id='searchticketres'></div> <div id='dmain'></div> If I start typing in "M747" into my <input> I correctly get some matches returned. If I select one, say "M747100", the <input> correctly updates with this but the value passed to Updater seems to be "M747" as this is what 'data/foo.php' returns. Do I need to use defer() here? I did try adding "$('searchtickets').defer();" just before calling Updater but that didn't seem to have any effect. -- James Hoddinott --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---