Martin
Martin

Reputation: 10563

Using AJAX to include html on other web sites and retrieve user data

Would the following work? And I would like to know of there is a better way to do this if anyone has any ideas?

  1. Page loads ajax script file from another site/domain
  2. User fills in a form on the page and submits it via JSON/AJAX back to the original site/domain.

Upvotes: 0

Views: 531

Answers (1)

justkt
justkt

Reputation: 14766

The related question Cross-domain ajax - would this method work discusses the use of iframes to do cross domain Ajax. The accepted answer has a link to Cross domain communication with iframes, a post about how to communicate across domains using an iframe in a page. You can use one of the "hacks" there (spawning new iframes in the same domain, monitoring state, etc). to accomplish what you are trying to do.

Upvotes: 1

Related Questions