I don't know if this is possible in PHP don't think so but you can do
some very nifty things using JavaScript.

Let's say you got two frames named links and main.  Then you can for
example do something like this in a page called contacts.php in the main
frame

<body class="main"
onLoad="Javascript:top.frames[0].location='links.php?page=contacts'">

Then in your links.php page you could have this php code.

if(isset($page))
        {
        include("./links/$page.inc");
        }

As you can see, the value of $page can be whatever you want.  So when
you then browse to another page, lets say companies.php then you could
include the special functions for that page in the links page.

This can be very usable for webbased applications when you wan't to keep
the functions on the right for each page, but want to change them
whenever you change pages.

There is a con to this all though.  When you use this method and hit the
back button you will only be taken one step back, so the links page will
only be taken back but not the main screen.  Best way to fix this is to
set up a pretty obvious back button that is in the path of the user
going to the left corner to the screen.  The link on that one would then
be: <a href="Javascript:history.back(-2)"> instead of the usual -1.

Hope this helps,

Maron Kristofersson
Reykjavik
Iceland
http://www.discovericeland.is/

-----Original Message-----
From: Michael George [mailto:[EMAIL PROTECTED]]
Sent: 12. mars 2001 21:06
To: [EMAIL PROTECTED]
Subject: [PHP] update two frames at once?


Hello al!

Is it possible to have two frames updated when cliking on one link?  I
have a
page that is broken into 4 parts:
        master title
        section title
d       section screen
i
r
.

what I want is that when a link is clicked on in the directory (the left
column), I'd like to update the section title *and* the section
screen...

It seemed a cool layout at the time, but I'm thinking this isn't easily
possible and I might just have to incorporate a section title on the
section
screen...  But before I rewrite it, I thought I'd ask here.

Thanks!

-Michael

P.S. I'd like to commend the regular posters to this list on being SOOO
     informative and patient!  Every small question to this list always
     gets several useful answers, even when I've seen questions asked
over
     and again.

-- 
No, my friend, the way to have good and safe government, is not to trust
it
all to one, but to divide it among the many, distributing to every one
exactly
the functions he is competent to.  It is by dividing and subdividing
these
republics from the national one down through all its subordinations,
until it
ends in the administration of every man's farm by himself; by placing
under
every one what his own eye may superintend, that all will be done for
the
best.
                -- Thomas Jefferson, to Joseph Cabell, 1816

-- 
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