Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6384131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:44:13+00:00 2026-05-25T02:44:13+00:00

I have an action email in my controller of application running on www.example.com and

  • 0

I have an action email in my controller of application running on http://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 http://www.example.com and replace the html using rjs template. Here are some code for you reference:

email.html.erb called on http://www.example.com

   <div id="div_content">
    <%= form_for(@user, :url => "http://data.example.com/mail", :remote => true) do |f| %>
    <%= f.label :email %>
    <%= f.text_field :email%>
    <% end %>
   </div>

email action of application on : data.example.com/email –

def email
  @user = User.create(params[:user])
  respond_to do |format|
    if @user.save!
       format.html { redirect_to(user_page_path(@user.vip_id), :notice => 'Thank you! You are now on our priority list.') }
       format.js
    else
       format.html { render :text => "user can not be saved at this moment!"}
    end
  end
end

email.js.rjs called on http://www.data.example.com/email

page.replace_html :div_content, :partial => "show", :object => @user

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.

Many Thanks,
Surya 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:44:13+00:00Added an answer on May 25, 2026 at 2:44 am

    Guys here is what I got to make it work –

    Well I was trying to do cross domain communication using my both RoR app as I mentioned right up there in my question!

    Finally I have found a way to achieve the same using “EasyXDM” (www.easyxdm.net) it solved the problem. It works great on most of the browsers including IE7 and Firefox older versions.
    CORS is another solution if you want to get it done, but it fails to work on IE7…

    whoa! now I can rely on the cross domain communication between my different apps without using an iFrame.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built and MVC3 application with a controller (Picture) and an action method
i am trying to implement the functionality of email in my application. i have
In one of my rails application I have to send a email. I just
I have an action that lets the customer preview system email messages and i
I have controller users . In this controller I have action account which is
I have this action for updating data: def edit @project = Project.find(params[:id]) if @project.team
I have an action inside my controller class and I want two different routes
I have an application I am developing where the user is allowed to email
I have an asp.net mvc application with three layers: - data layer with entities
Hi I have an action in my controller, i am waiting to ModelBinder bind

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.