Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Cross-frame execution


Message #1 by "Bill Knapp" <bill.knapp@t...> on Mon, 18 Jun 2001 19:43:00
Hi,
I'm not sure where you can research it in depth, but here is how you can 
do what you said in the message.
Here, you are referencing the other frame and calling a function in that 
frame:

// top frame code
<script>
function clickIcon()
{
  // This gets the bottom frame of the whole page, and calls the function 
bottomFunction() in that frame.
  parent.bottomFrame.bottomFunction();
  // replace bottomFrame with the name of the other frame
}
</script>

// bottom frame code
<script>
function bottomFunction()
{
  // do what you want...
}
</script>

Philip

  Return to Index