framea and frameb don't know about each other, but their document and their
window should know both of them.

So, you can use document.framea... and document.frameb... to access each
other's variables.

Also, if these variables are coming from PHP, and if you are using FRAMEs
mostly for looks, and not so much to save downloading one of the frames all
the time, another alternative, avoiding JavaScript, which you can never
trust to be on, much less to work properly when it is on, is to actually
send all your links back to the main frameset page, and pass the variables
down in parallel:

---- main.php ----
<?php
    $foo = isset($foo) ? $foo : '';
?>
<HTML>
  <FRAMESET>
    <FRAME SRC=framea.php?foo=<?php echo urlencode($foo);?>>
    <FRAME SRC=frameb.php?foo=<?php echo urlencode($foo);?>>
  </FRAMESET>
</HTML>

---- framea.php
<HTML><BODY>
<?php
    echo "foo is $foo<BR>\n";
?>
<A HREF=main.php?foo=bar TARGET="_top">bar</A>
<A HREF=main.php?foo=different TARGET="_top">different</A>
</BODY></HTML>

---- frameb.php
<HTML><BODY>
<?php
    echo "foo is $foo<BR>\n";
?>

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to