A
awesterink
I have 3 frames:
- mymenu
- mytitle
- mypage
In the 'mymenu' frame I can use an onclick function to change the source of
an image within that frame, for example, these all work:
<a href="clicked.htm" onclick="button.src='clicked.jpg';"><img name="button"
src="clickhere.jpg"></a>
<a href="clicked.htm" onclick="document.button.src='clicked.jpg';"><img
name="button" src="clickhere.jpg"></a>
<a href="clicked.htm" onclick="images['button'].src='clicked.jpg';"><img
name="button" src="clickhere.jpg"></a>
<a href="clicked.htm"
onclick="document.images['button'].src='clicked.jpg';"><img name="button"
src="clickhere.jpg"></a>
But if I try any of the following code to update an image in a specific
frame, it does not work:
<a href="clicked.htm" onclick="mymenu.button.src='clicked.jpg';"><img
name="button" src="clickhere.jpg"></a>
<a href="clicked.htm"
onclick="parent.frames['mymenu'].button.src='clicked.jpg';"><img
name="button" src="clickhere.jpg"></a>
What am I missing here?
- mymenu
- mytitle
- mypage
In the 'mymenu' frame I can use an onclick function to change the source of
an image within that frame, for example, these all work:
<a href="clicked.htm" onclick="button.src='clicked.jpg';"><img name="button"
src="clickhere.jpg"></a>
<a href="clicked.htm" onclick="document.button.src='clicked.jpg';"><img
name="button" src="clickhere.jpg"></a>
<a href="clicked.htm" onclick="images['button'].src='clicked.jpg';"><img
name="button" src="clickhere.jpg"></a>
<a href="clicked.htm"
onclick="document.images['button'].src='clicked.jpg';"><img name="button"
src="clickhere.jpg"></a>
But if I try any of the following code to update an image in a specific
frame, it does not work:
<a href="clicked.htm" onclick="mymenu.button.src='clicked.jpg';"><img
name="button" src="clickhere.jpg"></a>
<a href="clicked.htm"
onclick="parent.frames['mymenu'].button.src='clicked.jpg';"><img
name="button" src="clickhere.jpg"></a>
What am I missing here?