Re: update two frames at once?

From: Date: Wed, 14 Mar 2001 17:58:21 +0000
Subject: Re: update two frames at once?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-43886@lists.php.net to get a copy of this message
Here's what works for me-- You might adapt this to work on your frames. on the frameset page--index.php ---I put the following: <?php function build_querystring() { global $HTTP_GET_VARS; $vars=array(); //I use a list of the variables I want to be parsed here so as to avoid some mischief $varlist=array("var1","var2","var3"); while (list($key,$value)=each($HTTP_GET_VARS)){ reset($varlist); if (in_array($key,$varlist)){ $key=trim($key); $value=trim($value); $vars[]="$key=$value"; } } $dir="directoryname"; $thesevars=build_querystring(); $page=(isset($page) && $page !="")?"$page":"defaultpage"; $gopage=(!$thesevars=="")?"$page.php?":"$page.php"; $framepage="$dir$gopage$thesevars"; ?> Then in the frameset I make the url of mainFrame the value of $framepage <frameset rows="100,561*" frameborder="NO" border="0" framespacing="0" cols="*"> <frame name="topNav" scrolling="NO" noresize src="topnav.php>"> <frame name="mainFrame" src="<?php echo($framepage);?>"> </frameset> Then your links are coded like so: <a href="/index.php?page=whatever&var1=foo&var2=bar"> Maybe not the most elegant solution, but it works for me. Jeanne ----- Original Message ----- From: "Jens Nedal" <jnedal@ostry.com> To: <php-general@lists.php.net> Sent: Wednesday, March 14, 2001 5:05 AM Subject: Re: [PHP] update two frames at once? > Yes you can and there is even a neater script that does it. > with thise you can update any amount of frames a t the same time. > Just well i got to find it. msg back in a few..... > > Jens Nedal > > on 12.03.2001 22:15 Uhr, Angerer, Chad at cangerer@ibsys.com wrote: > > > Yes you can.. use Javascript > > > > Look here.. > > http://www.virtualgeoff.com/junkyard/frames/multiple/ > > > > Chad > > > > -----Original Message----- > > From: Michael George [mailto:george@mintcity.com] > > Sent: Monday, March 12, 2001 3:06 PM > > To: php-general@lists.php.net > > 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. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#43886) next »