Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Framesets & PHP 1

Status
Not open for further replies.

4x4uk

Technical User
Apr 30, 2002
381
GB
I have a website with two frames the left one providing all a tree menu for site navigation and the right frame for displaying all pages on the site.

I currently use javascript to ensure all pages load into the frameset the script is as follows:
<script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;>
<!--
if (top==self)
self.location.href=&quot;index.html&quot;;
-->
</script>
this works but it only loads the pages setup by default in the frameset.
I was wondering if it was possible to achieve something similar with PHP but for example if the user selects a particular page from a search engine listing load that page in the frameset.
MY thought was to
1) put the filename for each page into a variable on each page
2)set up a session in the index page then on every page to be displayed in the frame check if the session exists, load the index page and put the $pagename as the src for the main frame.
Any thoughts
thanks
In
Infinity exists! - I just haven't worked out a way to get there yet.

| |
 
Perhaps if you do:

<script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;>
<!--
if (top==self)
self.location.href=&quot;index.php?page=<?php echo $_SERVER['REQUEST_URI']; ?>&quot;;
-->
</script>


and then have index.php load $_GET['page'] into the frame.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top