main frame variables passed to content frame

Posted on 2003-11-18
Last Modified: 2008-03-06
ok, I have a strange one but I'de like to know if its possible. I have a frameset composed of two frames, a left and a right. left being navigation and right being content.  When I pass variables to the main frameset, how do I send the variables to the left frame without using one php file to build the frame?

url to frameset:




<frameset cols="170,100%*" frameborder="NO" border="0" framespacing="0" rows="*">
  <frame name="leftFrame" scrolling="NO" noresize src="left.php">
  <frame name="mainFrame" src="content.php" scrolling="AUTO">


Question by:dsyn
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 13

Expert Comment

ID: 9775909
can you clarify what you mean, i don't quite understand? if you want a link to open in one of the frames without having to change the entire frameset, you just need to link with the target as the name of the frame.. e.g. <a href="left.php?variable=something target="leftFrame">Click here</a>


Author Comment

ID: 9775934
I'm linking to the main frame page like this:
<a href="frameset.php?something=this">link</a>

so the left frame needs to be able to parse it, but the frameset itself (in the code) doesn't have any variables in it.

does that help? maybe?
LVL 13

Accepted Solution

lozloz earned 125 total points
ID: 9775996
so why not just have

<frameset cols="170,100%*" frameborder="NO" border="0" framespacing="0" rows="*">
  <frame name="leftFrame?something=<? print $_GET["something"]; ?>" scrolling="NO" noresize src="left.php">
  <frame name="mainFrame" src="content.php" scrolling="AUTO">

and then do more parsing in left.php
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users


Author Comment

ID: 9776336
what is this? $_GET["something"];  

does that get variables directly from the address bar?
LVL 20

Expert Comment

by:Muhammad Wasif
ID: 9776521
yes, you can get the parameters passed in adress bar with $_GET

echo $_GET["something"];



Author Comment

ID: 9776534
whoa, that's cool!

I'm gonna try that first thing tomorrow.. I'l let ya' know.. I'm still just starting out with php, so thanks for bearing with me.

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question