473,233 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,233 software developers and data experts.

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 2259
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
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
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
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
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
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
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
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
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
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.