I copied an exact copy of "http://demo.script.aculo.us/ajax/autocompleter" to my harddisc inclusive all .js and .css. Then I changed "new Ajax.Autocompleter(''contact_name'', ''contact_name_auto_complete'', ''/ajax/auto_complete_for_contact_name'', {})" to "new Ajax.Autocompleter(''contact_name'', ''contact_name_auto_complete'', ''http://demo.script.aculo.us/ajax/auto_complete_for_contact_name'', {})" But this doesn''t work. Did I something wrong? How can I debug? Simon
Ajax requests _must_ go to the same domain as the page they''re contained in. So, you can''t call script.aculo.us directly from your script when you''re running it locally. -Thomas Am 07.01.2006 um 20:33 schrieb Simon Brüchner:> I copied an exact copy of "http://demo.script.aculo.us/ajax/ > autocompleter" > to my harddisc inclusive all .js and .css. > > Then I changed "new Ajax.Autocompleter(''contact_name'', > ''contact_name_auto_complete'', ''/ajax/ > auto_complete_for_contact_name'', {})" > > to > > "new Ajax.Autocompleter(''contact_name'', ''contact_name_auto_complete'', > ''http://demo.script.aculo.us/ajax/auto_complete_for_contact_name'', > {})" > > But this doesn''t work. Did I something wrong? How can I debug? > > Simon > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Hi Simon , hi Tomas hi all this part of code needs insert in other page or in the same? <ul> <li>your mom</li> <li>yodel</li> </ul> Thomas Fuchs ha scritto:> Ajax requests _must_ go to the same domain as the page they''re > contained in. > So, you can''t call script.aculo.us directly from your script when > you''re running > it locally. > > > -Thomas > > Am 07.01.2006 um 20:33 schrieb Simon Brüchner: > >> I copied an exact copy of "http://demo.script.aculo.us/ajax/ >> autocompleter" >> to my harddisc inclusive all .js and .css. >> >> Then I changed "new Ajax.Autocompleter(''contact_name'', >> ''contact_name_auto_complete'', ''/ajax/ >> auto_complete_for_contact_name'', {})" >> >> to >> >> "new Ajax.Autocompleter(''contact_name'', ''contact_name_auto_complete'', >> ''http://demo.script.aculo.us/ajax/auto_complete_for_contact_name'', {})" >> >> But this doesn''t work. Did I something wrong? How can I debug? >> >> Simon >> >> lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >
Thomas Fuchs schrieb:> Ajax requests _must_ go to the same domain as the page they''re > contained in. > So, you can''t call script.aculo.us directly from your script when > you''re running > it locally. > > > -ThomasThank you! It woks fine locally when I use a local url, witch contains the "<ul><li>answer1</li></ul>"! Debug I also found a way of simple debugging: my search page contains this code: <input autocomplete="off" id="contact_name" name="contact[name]" size="60" value="" type="text"> <div style="position: absolute; left: 155px; top: 303px; width: 206px; opacity: 0.99999; display: none;" class="auto_complete" id="contact_name_auto_complete"> </div> <script type="text/javascript"> new Ajax.Autocompleter(''contact_name'', ''contact_name_auto_complete'', ''/ajax/ajaxRequest.php'', {}) </script> and in my answer page (PHP) I put in top for debug reasons: echo ''<ul><li>''; echo var_dump($_REQUEST); echo ''</li></ul>''; exit; So I get an ajax serverside debug information about the request. :) Simon