SitePoint Sponsor |
|
User Tag List
Results 1 to 7 of 7
Thread: Passing Variables to a frameset
-
Nov 20, 2004, 00:14 #1
- Join Date
- Nov 2004
- Location
- upland
- Posts
- 10
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Passing Variables to a frameset
I want to link from an html page to a frameset that has a nav bar in a top frame and a dynamic PHP page in the main frame( I am using frames because I want the viewer to have the nav bar accesible at all times while scrolling through the products. I am sending a variable via a link off of the html page as so: <a href="frameset.php?ID=player>DivX Players</a>. The nav bar (top frame) is loading, but the main frame comes up blank as if the variable has not been passed. The PHP code in the requested page works when called up by itself ,but not as part of a frameset. What do I need to do to send a variable and have it go through a frameset into a frame source?
-
Nov 20, 2004, 02:05 #2
- Join Date
- Aug 2000
- Location
- Philadephia, PA
- Posts
- 20,578
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Your frameset.php page should output a frame src for the main frame including the ID variable there as well. You essentially need to pass the variable twice -- from your link to the frameset, from the frameset to the frame.
Try Improvely, your online marketing dashboard.
→ Conversion tracking, click fraud detection, A/B testing and more
-
Nov 20, 2004, 12:58 #3
- Join Date
- Nov 2004
- Location
- upland
- Posts
- 10
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks for the advice, but I am still confused.
I don't know how to pass the variable from the frameset to the frame source..
I have tried
<?
$ID=$_get('ID')
?>
in the beginning of the frameset with a
<frame src="catalog_new.php?ID=$ID>
etc......
Do I need quotes around the string in the frame source tag or do I need to echo with PHP????
-
Nov 20, 2004, 13:01 #4
- Join Date
- Aug 2000
- Location
- Philadephia, PA
- Posts
- 20,578
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
<frame src="catalog_new.php?ID=<? echo $_GET['ID']; ?>">
Try Improvely, your online marketing dashboard.
→ Conversion tracking, click fraud detection, A/B testing and more
-
Nov 20, 2004, 16:20 #5
- Join Date
- Nov 2004
- Location
- upland
- Posts
- 10
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Do I still need the <?
$ID=$_get('ID');
?>
at the top?
-
Nov 20, 2004, 16:31 #6
- Join Date
- Aug 2000
- Location
- Philadephia, PA
- Posts
- 20,578
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by kageboy2003
Try Improvely, your online marketing dashboard.
→ Conversion tracking, click fraud detection, A/B testing and more
-
Nov 20, 2004, 16:37 #7
- Join Date
- Nov 2004
- Location
- upland
- Posts
- 10
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You are a lifesaver!!!!! I had tried everything and I knew that I was just coding the frame source tag wrong but didn't know why. Thanks again.
Bookmarks