Hello Everyone,
Please help the novice in java scripting. I'm trying to call changeSection (x, y) function from the iframe. Basically I have my code and my iframe tag in index.html. Then I click on the menu button and it loads an iframe with the name art.html. I have a function that defines which page the user is currently on and writes the name of it.
Here what I have in index.html
[HTML]<script type="text/javascript">
function changeSection (x, y) {
current=x;
document.getEle mentById("paget itle").innerHTM L = y;
}
</script>
<body>
<li> <a href = "art.html" target="window" > <img id="art" src="images/art.gif" onClick="change Section('art', 'art')" /></a></li>
<div id="pagetitle" >
</div>
<iframe src="slideshow. swf" id="window" name="window" frameborder="0" width="800px" height="490px" scrolling="no">
</iframe>
</body>
[/HTML]
Then in art.html I have some links that have to work with the same function changeSection(x , y). But it doesn't see it.
So I write:
[HTML]
<script type="text/javascript">
parent.changeSe ction (x, y);
</script>
<body>
<a href="123.html" ><img id="123" src="images/art/123.jpg" widht="79px" height="79px" alt="123"
onClick="change Section('123', 'Performance')"/></a>
</body>[/HTML]
Please help! I can't figure it out!
Please help the novice in java scripting. I'm trying to call changeSection (x, y) function from the iframe. Basically I have my code and my iframe tag in index.html. Then I click on the menu button and it loads an iframe with the name art.html. I have a function that defines which page the user is currently on and writes the name of it.
Here what I have in index.html
[HTML]<script type="text/javascript">
function changeSection (x, y) {
current=x;
document.getEle mentById("paget itle").innerHTM L = y;
}
</script>
<body>
<li> <a href = "art.html" target="window" > <img id="art" src="images/art.gif" onClick="change Section('art', 'art')" /></a></li>
<div id="pagetitle" >
</div>
<iframe src="slideshow. swf" id="window" name="window" frameborder="0" width="800px" height="490px" scrolling="no">
</iframe>
</body>
[/HTML]
Then in art.html I have some links that have to work with the same function changeSection(x , y). But it doesn't see it.
So I write:
[HTML]
<script type="text/javascript">
parent.changeSe ction (x, y);
</script>
<body>
<a href="123.html" ><img id="123" src="images/art/123.jpg" widht="79px" height="79px" alt="123"
onClick="change Section('123', 'Performance')"/></a>
</body>[/HTML]
Please help! I can't figure it out!
Comment