You want two web pages to load inside a third encompassing web page?
You are describing the use case for the iframe
element.
Edit: markdown support not the greatest.
You want two web pages to load inside a third encompassing web page?
You are describing the use case for the iframe
element.
Edit: markdown support not the greatest.
Yes,
I'm aware it's a use case for an iframe. However, I'm looking for a way to do it without an iframe. Most of the logic is there, just that there are these anomolies with the JavaScript variables.
For those that find this question is asking something that they are also struggling with, the answer was the 'embed' tag
You will need to place the element into a structural holder (eg div), and remove and recreate the element in JavaScript to get it to vanish and reappear if you want it to reload on show.
Pages loaded in this way do not inherit CSS theming, except background colour (if no background colour set). It does pick up @media settings, but only from the browser. This is intended behaviour.
Ultimately, to get the full functionality, I am going to have to redesign these items to be part of a single page, loading the data in piecemeal. However, this fix gets me a functional way of achieving something I need quicker than a redesign.
Thanks,
-BX
Have you tried putting the script tag(s) at the end of the body tag ?
That works except for the pages loaded in, which do have the JavaScript tags at the end of their respective pages, however, one claims that the variables being set at the top of the script are not accessible
Without seeing any code it seems obscure... Did you properly close the script tag ?
Can you host your code somewhere ? Codepen maybe ?