wbsurfver-/E1597aS9LQAvxtiuMwx3w@public.gmane.org
2007-Dec-12 01:27 UTC
how can I use form_remote_tag to go to a different host ?
Here''s sort of what I am trying to do if it''s possible: We have a server that uses TCL and can''t do any ajax. What I did was wrote a simple Rails app that uses form_remote_tag to get some text on a post and then displays back some text into a div via ajax and a partial render. I wanted to take all the html, javascript, and ajax calls that the Rails template creates by just sourcing the page and copying all of it and then pasting it into the page generated by the TCL server. Then changing it slightly so that the form submits to the Rails server and the Rails server renders the ajax back. Is there a way in form_remote_tag to specify a host ? I played around with some url_for but couldn''t get it to work and was unable to find any such thing doing google searches I wasn''t sure if this would work at all, but it seemed like initially I did have something working, but later when I tried it again it didn''t work so I am confused a bit I include all the default rails java script files and I change my form by adding the rails-server part to look like this but it doesn''t work: <form action="http://rails-server:3000/test/search" method="post" onsubmit="new Ajax.Updater(''search_results'', ''http://rails-server:3000/ test/search'', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;"> Search <input id="searchtxt" name="searchtxt" type="text" value="" /> <input name="commit" type="submit" value="Submit" /> </form> <div id="search_results"> </div> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---