473,513 Members | 2,709 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
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
it
//echo $locatie;
if (strstr($locatie, $omschrijving))
{
$beginTag = "";
$slotTag = "";
if ($noHrefClass != "")
{
$beginTag = "<span class = \"$noHrefClass\">";
$slotTag = "</span>";
}
echo "$beginTag$verwijzing$slotTag";
}
else
{
$beginTag = "<a ";
if ($aHrefClass != "")
{
$beginTag .= "class = \"$aHrefClass\" ";
}
$beginTag .= "href = \"$omschrijving\">";
echo("$beginTag$verwijzing</a>$separator");
}
}
Sep 5 '05 #1
2 2275
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
Sep 5 '05 #2

"Oli Filth" <ca***@olifilth.co.uk> schreef in bericht
news:U4*****************@newsfe7-win.ntli.net...
As an alternative to frames, you could investigate scrollable DIVs.

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 :)

Martien
Sep 5 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4841
by: Jawahar Rajan | last post by:
All, I have an ASP site that uses frames two frames. (yes I should be using include files, but we started ou using frames so we have been stuck with frames.) When I get a page expired warning...
4
2118
by: Chris45 | last post by:
Hi , Trying to get a menu working for sometime now have wasted money on stupid software etc.Now have been trying out a freebee from www.dynamicdrive.com, but have one or two question. It's...
4
3816
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following...
1
4300
by: ajay | last post by:
I have following code for a slide menu but i twiked it to work for a single level menu. Open it in a Browser to get a clear picture. I have 2 Qs 1) How to make first entry as non-link. i.e i...
2
5283
by: RWD | last post by:
I am trying to figure out how to change the target frame in my hyperlink on a DHTML menu. The menu is in one frame and the target frame is called "main" The code is below: Thanks in advance...
3
2152
by: John Ortt | last post by:
I appologise for reposting this but I have been trying to find a solution all week with no avail and I was hoping a repost might help somebody more knowledgable than myself to spot the message... ...
1
1992
by: proplady | last post by:
I've had this menu for some time, and periodically make changes. I've made some changes now (just some menu items), and the menu will not show up on my webpages. I know it's something simple,...
1
1600
by: raghuvarmabh | last post by:
I am generating dynamic menu using css.the menus are loaded from data base at start up.But i am having some serious problems. 1.The menu is unable to roll over select boxes in IE6.This is very...
0
7373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7094
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7519
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5677
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5079
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.