I have an action email in my controller of application running on www.example.com and I am trying to send the form data of email to www.data.example.com/email where my another application receives the
request
and I am able to save the data in js format. But I want to send back the
acknowledgement to www.example.com and replace the html using rjs
template.
Here are some code for you reference:
I can see in my log that request comes all the way from one domain to
sub
domain and even action gets triggered but, I can not get the response
back
to the main domain. So, is there any way to send a callback to main
domain.
I just want to reflect changes there at the form which is inside
div_contentdiv and want to replace with content of
_show.html.erb which I have on my sub domain.
I can see in my log that request comes all the way from one domain
to sub domain and even action gets triggered but, I can not get the
response back to the main domain. So, is there any way to send a
callback to main domain. I just want to reflect changes there at the
form which is inside div_content div and want to replace with
content of _show.html.erb which I have on my sub domain.
hey Thanks for your kind response. So, what I should do to achieve the
same?? Any idea?
On Sat, Aug 13, 2011 at 6:29 PM, Walter Lee D. [email protected]wrote:
email.html.erb called on www.example.com
<%= f.text_field :email%>
format.html { render :text => "user can not be saved at this
If you’re trying to do all this in JavaScript, you’re going to run smack
To post to this group, send email to
rubyonrails-talk@googlegroups.**com[email protected]
.
To unsubscribe from this group, send email to
hey Thanks for your kind response. So, what I should do to achieve
the same?? Any idea?
You can use a proxy endpoint on www.example.com to reflect what you
get from data.example.com into the correct address space. You can also
use a cross-domain privilege escalation to leave things as they are.
If you control both servers, google “cross-domain JavaScript” for a
thousand pounds of documentation on how to set this up. Personally, I
would see if you could re-architect the system so that the request
could happen within the same domain. You may be able to set up your
server such that www.example.com/data/ and data.example.com/ are
precisely the same thing.
Walter
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.