Cruentatio
2007-Oct-17 11:36 UTC
Ajax request from an external web site to a controller action
Hi, I need to write a little JS file (to place in not rails web site) in which I need to make an ajax call like this http_request.open(''GET'', url, true); where URL is a rails url of my web site (http://my-site.com:3000/controller/action/par1/ par2) and return a string in the web site that start the request and put in a dedicated DIV. The JS should be added to any web-site. Can you help me!? Thanks!!! Bye! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Cruentatio
2007-Oct-17 18:42 UTC
Re: Ajax request from an external web site to a controller action
Please!! Help me!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
thehcdreamer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Oct-17 19:25 UTC
Re: Ajax request from an external web site to a controller action
Yo can''t write an ajax request for a different website. For example, if you are on www.example.com you can''t make a request to www.google.com. There are other solutions if this is the problem On 17 Ott, 13:36, Cruentatio <cruenta...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, I need to write a little JS file (to place in not rails web site) > in which I need to make an ajax call > like this http_request.open(''GET'', url, true); where URL is a rails > url of my web site (http://my-site.com:3000/controller/action/par1/ > par2) and return a string in the web site that start the request and > put in a dedicated DIV. > The JS should be added to any web-site. > > Can you help me!? > > Thanks!!! > Bye!--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Cruentatio
2007-Oct-17 21:00 UTC
Re: Ajax request from an external web site to a controller action
Thanks a lot. Can you tell me any solutions? How I can make a req for a different web site?? On 17 Ott, 21:25, "thehcdrea...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <thehcdrea...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Yo can''t write an ajax request for a different website. > For example, if you are onwww.example.comyou can''t make a request towww.google.com. > There are other solutions if this is the problem > > On 17 Ott, 13:36, Cruentatio <cruenta...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi, I need to write a little JS file (to place in not rails web site) > > in which I need to make an ajax call > > like this http_request.open(''GET'', url, true); where URL is a rails > > url of my web site (http://my-site.com:3000/controller/action/par1/ > > par2) and return a string in the web site that start the request and > > put in a dedicated DIV. > > The JS should be added to any web-site. > > > Can you help me!? > > > Thanks!!! > > Bye!--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Michael Graff
2007-Oct-17 21:34 UTC
Re: Ajax request from an external web site to a controller action
You cannot. The browser will not allow it. --Michael --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Greg Willits
2007-Oct-17 21:57 UTC
Re: Ajax request from an external web site to a controller action
Niko Perry wrote:> Hi, I need to write a little JS file (to place in not rails web site) > in which I need to make an ajax call > like this http_request.open(''GET'', url, true); where URL is a rails > url of my web site (http://my-site.com:3000/controller/action/par1/ > par2) and return a string in the web site that start the request and > put in a dedicated DIV. > The JS should be added to any web-site.What you''re describing is functionality along the lines of a widget. There''s a few ways to do it, but the easiest for the remote site is usually an iframe. Investigate how widgets work, an you''ll get some ideas. -- gw -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---