0

i'm running into an issue. Let me explain: Domain A (I only have access to the body) Domain B (I have full access and it's on GitHub pages but can be moved and these are only static html files)

I want to embed Domain B (Static Html) within inside Domain A and be able to edit the embedded Full HTML page of B to be copied and used on A.

The issues i'm running into are of course cross origin, I'm not able to upload html to Domain A (I know if could this all could be accomplished through I-Frames), and PostMessage doesn't seem to work properly (probably because i'm running script in Body of A).

Please Help

2 Answers2

0

This is cors issue. You are trying to submit the request to another domain. For security reasons browser will prevent Cors request. You have two options.

  1. Either enable cors from Server side if you have control over server side and if you can modify the server side code.
  2. Use the iframe in DomainA to load the page from DomainB
parag
  • 2,483
  • 3
  • 20
  • 34
0

Here you go take a look at this: How to use CORS to access an iframe

Basically you can't use CORS in an IFRAME, you will have to figure out a way to make Post Message work