Hi to all, is it possible to use "Ajax.Autocompleter" from Scriptaculous with an external URL? I want to call a Funktion on another server, not on my server to receive a list, but it does not run. For example: ########## The root server is: http://www.rootserver.com The "autocompleter"-Server is: http://www.autocompleter.com HTML-Site on www.rootserver: http://www.rootserver.com/test.html <html> .... ... <script type="text/javascript"> new Ajax.Autocompleter("ac1", "autocomplete", "http://www.autocompleter.com/GetKeyWords.php", { paramName: ''keyword'', minChars: 1 , indicator: ''indicator1'' });</script> .... </HTML> Why does the autocompleter not run? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Christophe Porteneuve
2007-May-03 12:02 UTC
Re: Scriptaculous - Autocomplete with external URL?
Hey, Developer a écrit :> is it possible to use "Ajax.Autocompleter" from Scriptaculous with an > external URL?You''re bound to the usual AJAX security constraints, which means you''re subject to the SOP (Same Origin Policy): same host, same port. Depending on your browser, YMMV, but except on MSIE (AFAIK), it''s generally pretty strict, and non-customizable (at least not in any easy way) by your users. -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Christophe, thank you for your answer. I will try to write an "proxy-method" on the root-server: http://www.rootserver.com/proxyconsumer.php This proxy-consumer can include the url: http://www.autocompleter.com/GetKeyWords.php Hope, that this will solve my problem, but it seems not to be a high performance solution. Kind regards Christian On 3 Mai, 14:02, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Hey, > > Developer a écrit : > > > is it possible to use "Ajax.Autocompleter" from Scriptaculous with an > > external URL? > > You''re bound to the usual AJAX security constraints, which means you''re > subject to the SOP (Same Origin Policy): same host, same port. > > Depending on your browser, YMMV, but except on MSIE (AFAIK), it''s > generally pretty strict, and non-customizable (at least not in any easy > way) by your users. > > -- > Christophe Porteneuve aka TDD > t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
If your server is Apache, you can also use the mod_proxy module to allow Apache to act as a pass-thru for the foreign URLs. Saves you the trouble of writing proxy code yourself. Peace, AMA3 ----- Original Message ----- From: "Developer" <ch-gyMb1R/nBgNpEKysQ+xqfCXEfswBiFidx090KOjTKBU@public.gmane.org> To: "Ruby on Rails: Spinoffs" <rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Sent: Thursday, May 03, 2007 08:19 Subject: [Rails-spinoffs] Re: Scriptaculous - Autocomplete with external URL? Hi Christophe, thank you for your answer. I will try to write an "proxy-method" on the root-server: http://www.rootserver.com/proxyconsumer.php This proxy-consumer can include the url: http://www.autocompleter.com/GetKeyWords.php Hope, that this will solve my problem, but it seems not to be a high performance solution. Kind regards Christian On 3 Mai, 14:02, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Hey, > > Developer a écrit : > > > is it possible to use "Ajax.Autocompleter" from Scriptaculous with an > > external URL? > > You''re bound to the usual AJAX security constraints, which means you''re > subject to the SOP (Same Origin Policy): same host, same port. > > Depending on your browser, YMMV, but except on MSIE (AFAIK), it''s > generally pretty strict, and non-customizable (at least not in any easy > way) by your users. > > -- > Christophe Porteneuve aka TDD > t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hi AMA3, yes, great Tip! I implement it with a Apache-Mod-Rewrite Rule, but other clients don`t use Apache. So i must write proxy code. Kind regards. On 3 Mai, 16:58, "AMA3" <a...-ySNssrZK0L0@public.gmane.org> wrote:> If your server is Apache, you can also use the mod_proxy module to allow > Apache to act as a pass-thru for the foreign URLs. Saves you the trouble of > writing proxy code yourself. > > Peace, > AMA3 > > ----- Original Message ----- > From: "Developer" <c...-gyMb1R/nBgNpEKysQ+xqfCXEfswBiFidx090KOjTKBU@public.gmane.org> > To: "Ruby on Rails: Spinoffs" <rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > Sent: Thursday, May 03, 2007 08:19 > Subject: [Rails-spinoffs] Re: Scriptaculous - Autocomplete with external > > URL? > > Hi Christophe, > > thank you for your answer. > > I will try to write an "proxy-method" on the root-server:http://www.rootserver.com/proxyconsumer.php > > This proxy-consumer can include the url:http://www.autocompleter.com/GetKeyWords.php > > Hope, that this will solve my problem, but it seems not to be a high > performance solution. > > Kind regards > > Christian > > On 3 Mai, 14:02, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote: > > Hey, > > > Developer a écrit : > > > > is it possible to use "Ajax.Autocompleter" from Scriptaculous with an > > > external URL? > > > You''re bound to the usual AJAX security constraints, which means you''re > > subject to the SOP (Same Origin Policy): same host, same port. > > > Depending on your browser, YMMV, but except on MSIE (AFAIK), it''s > > generally pretty strict, and non-customizable (at least not in any easy > > way) by your users. > > > -- > > Christophe Porteneuve aka TDD > > t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---