You are here: Re: Dynamic menu bar in a frame - controlling frames in php? « PHP Programming Language « IT news, forums, messages
Re: Dynamic menu bar in a frame - controlling frames in php?

Posted by Oli Filth on 09/05/05 20:17

Martien van Wanrooij said the following on 05/09/2005 17:44:
> 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
> do.
> I am thinking of making all the links to something like <a href =
> "main.php?content=songlist">
> 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
>

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


CSS
===

HTML { overflow: hidden; }

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

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




HTML
====


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

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



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


--
Oli

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация