I am working on a random school project.
Currently, I have a page that includes two CSS. One for normal view and one for handicapped view.
<link rel="stylesheet" type="text/css" href="css/main.css" title="main" media="screen">
<link rel="stylesheet" type="text/css" href="css/gyengen.css" title="alt" media="screen">
This page also includes two buttons that will change the used stylesheet.
function changeStyle(main) {
var lnks = document.getElementsByTagName('link');
for (var i = lnks.length - 1; i >= 0; i--) {
if (lnks[i].getAttribute('rel').indexOf('style')> -1 && lnks[i].getAttribute('title')) {
lnks[i].disabled = true;
if (lnks[i].getAttribute('title') == main) lnks[i].disabled = false;
}}}
<div class="gyengen">
<span onclick="changeStyle('main')" class="normal"><img src="css/pictures/inverse.png" alt="Normál stíluslap"></span>
<span onclick="changeStyle('alt')" class="inverse"><img src="css/pictures/inverse.png" alt="Inverz stíluslap"></span>
</div>
I have an image map on the page that links to an iframe target if clicked on the specific position.
<area shape="poly" coords="329,130,342,57,389,45,441,58,481,86,514,148,481,173,453,166,443,199,409,222,370,283,337,278,332,225,331,140" href="zones/gorgrond.html" alt="Gorgrond" title="Gorgrond" target="zone">
<iframe name="zone" onload='javascript:resizeIframe(this);'></iframe>
Both websites are on the same domain. I would like to achieve is that, if I change the stylesheet of the parent window with the method mentioned above, I would like to change the iframe's CSS source as well. The website linked into the iframe has the same html tags as the parent window.
EDIT: Unfortunately, I am only allowed to use HTML5, XHTML Strict, jQuery/java