Does anyone know how to control one frame from another frame? I am trying something simple, and probably have made some simple mistake, But I am trying to use a button to control one frame from another frame. I have two frames in a frameset. The top frame name is "topFrame" and its soucre is Page1.htm. The bottom frame name is "bottomFrame" and its source is Page2.htm. The button is in Frame2.
Home1.htm contains the frameset and contains:
<frameset col rows="*,*""50%,*">
<frame src="Page1.htm" name="topFrame">
<frame src="Page2.htm" name="bottomFrame">
</frameset><noframes></noframes>
Frame1.htm contains the code below and is in the body of the page
<script language="JavaScript">
function Refresh() {
alert('Hello world');
}
</script>
Frame2.htm contains the button
To the button in Frame2 I have attached a Javascript behavior "call Refresh()"
I have set the Link in the properties of the button to "Home1.htm" which is the
name of my Frameset, and the target to "_top".
When I press the button I can see the frames flicker, but I don't get any alert window.
Do I have to tell Page1.htm to get the focus, or some similar command ???
Home1.htm contains the frameset and contains:
<frameset col rows="*,*""50%,*">
<frame src="Page1.htm" name="topFrame">
<frame src="Page2.htm" name="bottomFrame">
</frameset><noframes></noframes>
Frame1.htm contains the code below and is in the body of the page
<script language="JavaScript">
function Refresh() {
alert('Hello world');
}
</script>
Frame2.htm contains the button
To the button in Frame2 I have attached a Javascript behavior "call Refresh()"
I have set the Link in the properties of the button to "Home1.htm" which is the
name of my Frameset, and the target to "_top".
When I press the button I can see the frames flicker, but I don't get any alert window.
Do I have to tell Page1.htm to get the focus, or some similar command ???