|
-
Jul 28th, 2004, 10:09 PM
#1
Thread Starter
Junior Member
header controled Frame
Is it possible to create a dynamic type of page that will change the URL address when the frame content is changed, like index.php?main=updates.html
this way I could include my framed menu without the lack of linking capabilities. Any ideas?
To clarify the index page would be a dynamic page with frames. When you click a link instead of leaving the URL address alone, it changes to index.php?main=content/link.html
This way you can have a framed menu and better linking capabilites.
Last edited by J_Man; Jul 29th, 2004 at 10:27 PM.
-
Jul 29th, 2004, 01:41 AM
#2
You mean something like:
Code:
<frameset><frame src="nav.php">
<frame src="<?php echo $_GET['main']; ?>"></frameset>
Sure is possible. Just make sure nobody can insert their own pages into your frameset.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Aug 6th, 2004, 01:00 PM
#3
Thread Starter
Junior Member
how do I set the default page if there is no value? I'm using cells now
Code:
<td nowrap><?php include $_GET['load']; ?></td>
-
Aug 6th, 2004, 01:13 PM
#4
I do this on my site. It also stops people injecting their own vlaues too:
PHP Code:
<?php
$location = (isset ($_GET['location'])?$_GET['location']:'main');
switch ($location) {
case 'random':
$includefile = 'random.php';
break;
case 'projects':
$includefile = 'projects.php';
break;
case 'main':
default:
$includefile = 'main.php';
}
@include ("include/$includefile");
?>
-
Aug 6th, 2004, 02:03 PM
#5
Thread Starter
Junior Member
doesn't seem to work, I don't need to prevent injecting own values or any thing complex, just an include page and a default start page. How do I apply the code you gave?
Last edited by J_Man; Aug 6th, 2004 at 02:15 PM.
-
Aug 6th, 2004, 02:17 PM
#6
Frenzied Member
umm... you put it in the page?
Can you explain what it is that isn't working? Are you getting an error... is it loading the wrong page... ???
-
Aug 6th, 2004, 10:37 PM
#7
Thread Starter
Junior Member
Code:
<frameset><frame src="nav.php">
<frame src="<?php echo $_GET['main']; ?>"></frameset>
I need to do the exact same thing but in .asp now, other code is already .asp
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|