473,671 Members | 2,570 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?conte nt=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($om schrijving, $verwijzing, $separator = "",
$aHrefClass = "", $noHrefClass = "")
{
$locatie = $_SERVER['PHP_SELF'];
//link to the current page, no need for clicking on
it
//echo $locatie;
if (strstr($locati e, $omschrijving))
{
$beginTag = "";
$slotTag = "";
if ($noHrefClass != "")
{
$beginTag = "<span class = \"$noHrefClass\ ">";
$slotTag = "</span>";
}
echo "$beginTag$verw ijzing$slotTag" ;
}
else
{
$beginTag = "<a ";
if ($aHrefClass != "")
{
$beginTag .= "class = \"$aHrefClas s\" ";
}
$beginTag .= "href = \"$omschrijving \">";
echo("$beginTag $verwijzing</a>$separator") ;
}
}
Sep 5 '05 #1
2 2287
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?conte nt=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******** *********@newsf e7-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
4848
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 (I am not caching pages) and a user clicks refresh from the menu bar the user is taken back to the home page! The home page is a frame with a top frame that is repeated on each subsequent asp pages
4
2128
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 properly better if I was to show you it so have uploaded it to with a couple of question. http://teaup.port5.com/test/ This is where my problem starts how do I make the menu veawable over this frame ? Then the next problem is how would one make the...
4
3833
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 beautiful script "http://javascript.internet.com/navigation/toolbar-menu.html". It works like a charm. I made my webpage in frames, where the nav-frame shows the menubar, so whenever I click a link in the menubar, it opens in the frame below. But...
1
4316
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 want to make first text as Table Heading/menu category. For examle in the given menu i want to make a heading as "Comp. Languages" which won't be a link. 2) The position of this menu is absolute to the page. I want to make it absolute to the Table...
2
5293
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 RWD <script type='text/javascript'>
3
2155
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... I am trying to write a webpage in Javascript. The page loads with three frames, a top, left and right frame. Depending on the users actions the background page rewrites the code for the relevant frames.
1
2003
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, but I just can't see it. Can anyone help? var NoOffFirstLineMenus=6; // Number of first level items var LowBgColor='white'; // Background color when mouse is not over var LowSubBgColor='99CCFF'; // Background color when mouse is not over...
1
1605
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 serious problem.And in my project we should use IE6 compulsory.When an menu encounters a select box,the part of menu over the select box is cut and select box is appearing instead of menu. 2.When i use html frames my menu is not rolled over next...
0
8403
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8930
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8828
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8677
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7446
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4417
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2819
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2062
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1816
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.