473,396 Members | 1,846 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,396 software developers and data experts.

Display Links

I am a newbie for sure;

problem,

I have a page that has dynamically generated sections at the top, when
I click on one of the sections I would like the list of categories
associated with the section to display in my left navigation; If I
click a different section the current navigation list would be
replaced by the categories associated with the new section I clicked
on and so on.

I am sure this is easy for most of you but it is killing me. :-)

God bless
jason

Jun 14 '07 #1
4 1509
You can generate the menu from an array. For example:

$sections = array(
'about' =array(
'team' ='Our Team',
'directions' ='Directions',
'history' ='History'
),
'services' =array(
'design' ='Design',
'construction' ='Building & Construction',
'repair' ='Repair'
)
)

To print your menu:

$currentSection = 'about';
$contents = $sections[$currentSection];
foreach ($contents as $dest =$title) {
$links .= "<li><a href=\"$item\">$title</a></li>"
}

On Jun 13, 11:12 pm, jsd219 <i...@musiclanerecording.comwrote:
I am a newbie for sure;

problem,

I have a page that has dynamically generated sections at the top, when
I click on one of the sections I would like the list of categories
associated with the section to display in my left navigation; If I
click a different section the current navigation list would be
replaced by the categories associated with the new section I clicked
on and so on.

I am sure this is easy for most of you but it is killing me. :-)

God bless
jason

Jun 14 '07 #2
On Jun 13, 11:25 pm, petersprc <peters...@gmail.comwrote:
You can generate the menu from an array. For example:

$sections = array(
'about' =array(
'team' ='Our Team',
'directions' ='Directions',
'history' ='History'
),
'services' =array(
'design' ='Design',
'construction' ='Building & Construction',
'repair' ='Repair'
)
)

To print your menu:

$currentSection = 'about';
$contents = $sections[$currentSection];
foreach ($contents as $dest =$title) {
$links .= "<li><a href=\"$item\">$title</a></li>"

}

On Jun 13, 11:12 pm, jsd219 <i...@musiclanerecording.comwrote:
I am a newbie for sure;
problem,
I have a page that has dynamically generated sections at the top, when
I click on one of the sections I would like the list of categories
associated with the section to display in my left navigation; If I
click a different section the current navigation list would be
replaced by the categories associated with the new section I clicked
on and so on.
I am sure this is easy for most of you but it is killing me. :-)
God bless
jason
I don't quite follow, :-) if you go to: http://www(dot)discbid(dot)net
you can see what i am talking about. notice the section at the top
next to catalog. It currently has 7 entries, camryn, deda,
grandpa...but it can change. it is dynamically generated so the client
can add to or take away any of these sections. when you click on one
of the sections, the navigation bar at the left should populate with
all the categories created under that section, this too is dynamically
generated and can change.

Any and all help is greatly appreciated

God bless
jason

Jun 14 '07 #3
On Thu, 14 Jun 2007 03:12:57 -0000, in comp.lang.php jsd219
<in**@musiclanerecording.com>
<11**********************@i13g2000prf.googlegroups .comwrote:
>| I am a newbie for sure;
|
| problem,
|
| I have a page that has dynamically generated sections at the top, when
| I click on one of the sections I would like the list of categories
| associated with the section to display in my left navigation; If I
| click a different section the current navigation list would be
| replaced by the categories associated with the new section I clicked
| on and so on.
|
| I am sure this is easy for most of you but it is killing me. :-)
|
| God bless
| jason
This sounds like a perfect application for AJAX.
I've emailed you the zipped files that I hope you will find useful.
---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Jun 14 '07 #4
jsd219 wrote:
On Jun 13, 11:25 pm, petersprc <peters...@gmail.comwrote:
>You can generate the menu from an array. For example:

$sections = array(
'about' =array(
'team' ='Our Team',
'directions' ='Directions',
'history' ='History'
),
'services' =array(
'design' ='Design',
'construction' ='Building & Construction',
'repair' ='Repair'
)
)

To print your menu:

$currentSection = 'about';
$contents = $sections[$currentSection];
foreach ($contents as $dest =$title) {
$links .= "<li><a href=\"$item\">$title</a></li>"

}

On Jun 13, 11:12 pm, jsd219 <i...@musiclanerecording.comwrote:
>>I am a newbie for sure;
problem,
I have a page that has dynamically generated sections at the top, when
I click on one of the sections I would like the list of categories
associated with the section to display in my left navigation; If I
click a different section the current navigation list would be
replaced by the categories associated with the new section I clicked
on and so on.
I am sure this is easy for most of you but it is killing me. :-)
God bless
jason

I don't quite follow, :-) if you go to: http://www(dot)discbid(dot)net
you can see what i am talking about. notice the section at the top
next to catalog. It currently has 7 entries, camryn, deda,
grandpa...but it can change. it is dynamically generated so the client
can add to or take away any of these sections. when you click on one
of the sections, the navigation bar at the left should populate with
all the categories created under that section, this too is dynamically
generated and can change.

Any and all help is greatly appreciated

God bless
jason
Jason,

As Peter indicated, you need to generate the menu items dynamically.
When the user clicks on the top section, your code needs to handle the
change.

Basically in your case the link should be directed back at the same
page. Look at which parameter was passed (if any - the first time there
won't be a parameter) and build the appropriate menu. Then output the
entire page again.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jun 14 '07 #5

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

Similar topics

3
by: timbratureman | last post by:
I have a txt file in my server. I have to provide to the user 2 links. One link is to download the file and the other one is to display it inside the browser. Is it possible? I made <a...
7
by: Marc | last post by:
Hi everyone. I am having trouble with a stylesheet in mozilla. It is part of turning a list into a menu: #menu li{ margin: 0; display: inline; vertical-align: bottom;
4
by: bissatch | last post by:
I am trying to use DIV tags and a class to hide the DIV and the HTML within. I will use JavScript to change it from hidden to visible but that will come later. Below is the code I am using ...
7
by: TLM | last post by:
I am trying to build a web application that will contain links to files on a users local computer. I am assuming that the files will be in a known location and can display in a browser window. ...
1
by: Henrik | last post by:
Hello all. I'm after some sort of pagination function. One that takes some in data that I provide, and returns an array of controls, pointing to page 2, page 3 etc. Trying to mimic the way that...
18
by: fishwick | last post by:
I haven't really done any css in quite a while, and am banging my head against the wall trying get the rudimentary layout together of a church website home page to display correctly - I don't want...
1
by: sneeka2 | last post by:
Hi, I'm developing a portfolio site, which contains a bunch of thumbnails wrapped in links: <a href="..."><img ... /></a>. A window.onload script inserts an onclick property into the links which...
5
by: PHPBABY3 | last post by:
Hi, 1. I have two SQL tables. I will call them employees and departments: EMP: LAST_NAME, FIRST_NAME, DEPTNM DEPT: NUM, NAME Input: text string FIND Output: the LAST_NAME, FIRST_NAME...
2
by: Evan M. | last post by:
Hello there, I have an interesting problem to takle. I'm creating a website that's going to be run in a local Intranet. The site uses a MasterPage / content page scheme, with the Master page...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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...
0
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...

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.