Hi
I have 2 frames, one with a button and one with some text. When I press the button in the first frame I want to change the text in the second frame.
Code:
main.htm:
<html>
<frameset id="mainframe" border="0" framespacing="0" frameborder="0" cols="50%,50%">
<frame name=frame1 src="frame1.htm" scrolling="no">
<frame name=frame2 src="frame2.htm" scrolling="no">
</frameset>
</html>
frame1.htm:
<html>
<body>
<script LANGUAGE="VBScript">
Sub change_OnClick
' This is not working
parent.document.all("frame2").all("frameTxt2").InnerText = "Hee hee, tickles, that does!"
End Sub
</script>
<INPUT TYPE="BUTTON" VALUE="Click me" NAME="change">
</body>
</html>
frame2.htm
<html>
<body><P ID="frameTxt2">...</P></body>
</html>
The part where I want to change the text is in bold, but that code doesn't work. Can anyone help me with this?
Thanks in advance.