Dynamic menu bar in a frame - controlling frames in php?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have been using in a lot of websites a script that creates a menu bar but
avoids that the button to the current page can be clicked.
I am rather satisfied with it (although suggestions for better ways of doing
things are welcome, the script follows below FYI)
No there is a a problem that for a new site (www.orkestbasic.nl/nieuw) the
menu with the links has to be placed in a separate frame because the right
part of the page must be scrollable. So the check wether a button has to be
a link or not cannot be done anymore with checking PHP_SELF  as I am used to
I am thinking of making all the links to  something like <a href =
then main.php would be a frameset with  something like <frame name =
"content" src = "<?php echo "$content.php"?>">
In the left frame I could do a similar thing with a small modification to
the createlink function (see below) I often use.
But I would like to know if there are more elegant suggestions for it. Could
not find really good tips on google. Thanks for any help

FYI This is the function I have been using until now.

 function mvwMaakLink($omschrijving, $verwijzing, $separator = "",
$aHrefClass = "", $noHrefClass = "")
  $locatie = $_SERVER['PHP_SELF'];
                       //link to the current page, no need for clicking on
  //echo $locatie;
  if (strstr($locatie, $omschrijving))
   $beginTag = "";
   $slotTag = "";
   if  ($noHrefClass != "")
    $beginTag = "<span class = \"$noHrefClass\">";
    $slotTag = "</span>";
   echo "$beginTag$verwijzing$slotTag";
   $beginTag = "<a ";
   if ($aHrefClass != "")
    $beginTag .= "class = \"$aHrefClass\" ";
   $beginTag .= "href = \"$omschrijving\">";

Re: Dynamic menu bar in a frame - controlling frames in php?

Martien van Wanrooij said the following on 05/09/2005 17:44:
Quoted text here. Click to load it

As an alternative to frames, you could investigate scrollable DIVs.


HTML    { overflow: hidden; }

    position: absolute;
    width: 30%;    
    height: 100%;
    top: 0;
    left: 0;
    background: #FF9999;

    position: absolute;
    width: 70%;
    height: 100%;
    top: 0;
    right: 0;
    background: #9999FF;
    overflow: scroll;


<DIV id="menu">
    ... menu stuff here ...

<DIV id="pagecontent">
    ... the page content here ...

This avoids the evils of frames, (Google for "frames are evil").


Re: Dynamic menu bar in a frame - controlling frames in php?

Quoted text here. Click to load it
I know that this possibility and I often visit a Dutch ng to discuss such
problems but I am afraid it will be very difficult to make it work in all
browsers. Although this is offtopic for the php forum I would like that my
customer would write shorter text to avoid the whole scrolling problem. :)
Thanks for your advise anyway :)


Site Timeline