1

I'm trying to insert an external website into a parent website. I'm using the following method to prepare the content:

jQuery.ajax({
    type: "POST",
    url: url,
    xhrFields: {
      withCredentials: true
    },
    crossDomain: true
}).done(function (result) {
    ...
    embedDiv = document.getElementById("embedDiv");
    embedDiv.innerHTML = result;
)}

Now, while all the CSS and Javascript Code is working perfectly, it also takes effect on all the elements of the parent page. Is there a way to restrict all the loaded sources to only work within the div container "embedDiv"?

Thanks for any clues!

3
  • 1
    Do you have control over the external website code? Commented Feb 13, 2017 at 12:31
  • Yes I do. The external site is a Joomla CMS page. Commented Feb 13, 2017 at 15:03
  • See stackoverflow.com/questions/26389092/… Commented Jun 7, 2017 at 19:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.