I can't quite work out how I can get a frame being notified when another frame has changed.
<frameset rows="*,50">
<frame id="main_frame" src="mainframe" frameborder="0" name="main_frame">
<frame id="footer" src="footer" frameborder="0" scrolling="no" noresize="noresize" name="footer">
</frameset>
The footer frame needs to set some values in mainframe once it's loaded. If the user loads another page, this setup has to occur again. In the footer, I'd like to have an event on when the main frame has completed loading (every time it changes).
Is this possible (perhaps even with jQuery)?
The below is just an example; I used jQuery's load event, and this code would be placed in your main_frame
frame. It gets the parent of the frames, then the children frames as per the array. Hopefully you can extrapolate it into what you need.
In this example, it is assumed that the yourValue
variable is a global variable in either of your frames.
$(document).ready(function() {
$(window).load(function (){
window.parent.frames[0].yourValue = 4; // change values of main frame
window.parent.frames[1].yourValue = 4; // change values of footer frame
});
});