473,809 Members | 2,797 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1612
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...@musiclane recording.comwr ote:
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...@gmai l.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...@musiclane recording.comwr ote:
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**@musiclane recording.com>
<11************ **********@i13g 2000prf.googleg roups.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******@yourpa ntsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Jun 14 '07 #4
jsd219 wrote:
On Jun 13, 11:25 pm, petersprc <peters...@gmai l.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:

$currentSectio n = '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...@musiclane recording.comwr ote:
>>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*******@attgl obal.net
=============== ===
Jun 14 '07 #5

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

Similar topics

3
1862
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 href="file.txt">Download the file</a> but it display it, and it does not ask me to download it. (of course I could download it by clicking the right button, but my boss doesn't want that: he wants 2 different links).
7
5779
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
2240
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 <div class="hide"> <tr> <td nowrap>Name:</td> <td nowrap>Monty</td>
7
6399
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. I have my ASP.NET application building links along the lines of file://c:/<path to file>
1
1284
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 Google handles the pagination when a lot of pages are returned. That is: If you are at page 1 of 100 possible pages, you want to see the following:
18
2503
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 to continue work until I understand what I'm doing wrong. http://www.christchurchinfo.net The site displays nicely in Firefox/Mozilla and Safari, but the stained glass windows navigation portion is getting pushed down in IE, and the "news"...
1
2407
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 changes their behaviour to load the big image in a <div> on the same page, instead of going to another site. For that purpose I have a <div><img ... /></div> construct in the page which is set to a fixed height and width and 'display: none' via CSS....
5
2765
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 and department name NAME (link DEPTNM
2
2628
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 defining a "sidebar" area that contains links to pages, and the content for those pages being displayed in a single content area. The sidebar is divided up into sections, that are show/hidden without postbacks using javascript. Here's an example:
0
10639
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
10376
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
10120
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
9200
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...
1
7661
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5688
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3015
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.