Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • Greetings. I can get your code to work with the CORS plugin, but the question is A) how can I chop out a div (still getting errors even when the site is from the same domain! link and B) how do I only display one div BUT preserve the formatting? Is there a way to load the whole page and scripts into a hidden variable and only display the div in question? Or how can I load all of the scripts for the page so the div preserves proper formatting? Commented Jul 3, 2018 at 20:51
  • Are both of the pages loading from your domain? CORS is going to be a real pain in the butt with this requirement. If both pages are loaded from your domain then it would be easier to just create a smaller page that only displays the information you want with its styles and then just load it into an iFrame. To preserve the style in the div is going to be a nightmare and require writing a lot of specific css to target the elements inside your div. Commented Jul 3, 2018 at 21:22
  • No, the page which will load the website in an iframe will be hosted within an Ionic mobile app. Would this make it "origen: null"? I was told CORS issues that pop up in testing on Chrome shouldn't be an issue with the web pages hosted within the actual app. Commented Jul 3, 2018 at 21:57
  • So your page (lets call it index.htm), inside your Iconic mobile app, will load another page from some site (lets say theirsite.com/info.htm)? and you only want a certain div from theirsite.com/info.htm to render inside index.htm but retain all the styles from theirsite.com? Commented Jul 4, 2018 at 18:16
  • That is correct. Is there a script or method to load all CSS styles and scripts from the iframe site? Commented Jul 4, 2018 at 18:59