Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Dynamic Menu CSS


I am trying for a long time now, to find a way of creating a dynamic drop
down menu. I have the CSS part ready and working and also I have the first
level of the menu working.
the problem I have is how can I submit the id from the first level menu in
order to make the query and create the second level and so on menu.

I am trying to avoid Javascript but I can't see another way at the moment...
What I want to achieve is to produce the menu on HOVER if that is not
possible on click will be ok as well.
Do any of you have an idea ?

This is the code I have :
**********************************************
<div id="menu">
<ul>
<li><h2>Products</h2>
<ul>
<?php do { ?>
<li><a href="?cat_id=<?php echo
($row_product_categories['prod_category_id']); ?>"title="<?php echo
strtoupper($row_product_categories['prod_category_name']); ?>"><?php echo
ucfirst($row_product_categories['prod_category_name']); ?></a></li>
<?php }
while ($row_product_categories =
mysql_fetch_assoc($rs_product_categories)); ?>
<ul>

<?php do { ?>
<li><a href="index.php?id=<?php echo ($row_products['prod_id']);
?>"title="<?php echo strtoupper($row_products['prod_name']); ?>"><?php echo
ucfirst($row_products['prod_name']); ?></a></li>
<?php }
while ($row_products = mysql_fetch_assoc($rs_products)); ?>

</ul>
</li>
</ul>
</li>
</ul>
</div>
**************************************************




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Mysql Php Dynamic Menu
I am trying to write a script that will create dynamically a menu from MySQL
database. The database table is a product categories table and it has the folowing filed:

category_id, parent_category_id, category_name (some other fileds are there
as well but these are enough to figure out the logic)

I know that I have to store all the product_categories records in a temp
array and then some how go through them and store the level of each record
in the menu....

If you have done something like that I suppose you know what I mean and I
would much appreciate to give me a hint here ...
I had a look in the phpLayersMenu from sourceforge but it is really advanced
OO code and I cannot understand the logic....

My target is to create a Tree menu with no pre - defined number of
records...

Dynamic Navigation Menu
I need to build a dynamic menu that will include certain links depending on what variables are in the URL. This is doable - right?

For example: catalog.php?product=widget&color=green

Menu would look like:

Green Widgets
Brand 1 Green Widget
Brand 2 Green Widget
Brand 3 Green Widget
etc.

Any help would be greatly appreciated!

Dynamic Select Menu
I am trying to populate a select menu with data from a mysql db. I get the select menu, but no content or errors. The two fields are id and websites. Here is the code:

Dynamic Drop Down Menu
I'm having difficulties displaying the MakeModelID for a row selected from a drop down menu I've populated from a table combining three attributes (Make, Model and Specification - for example Ford Transit LWB 350 HR). What I require is to capture in a variable, such as $MakeModelID, the ID for that record selected. Code:

Creating Dynamic Drop Down Menu
I have a mysql database called Auditions with a table called Sept7. The table has two columns Time and Name. I want to create a dynamic pull down menu and populate it with items pulled from the table based on a query. Code:

Dynamic MySQL Nav Menu Sorting
I have this dynamic menu and I want to change the order of the menu items...
I added a column in the database wich has an integer value for ordering the
menuitems.
But the only way is by hardcoding them into the database.

I would like a way to sort them with drag-and-drop or with up/down arrows.

Do you think that except PHP & MYsql I will need Javascript as well ?
Any ideas how to do that ?

Dynamic Message Board Menu
Here's an issue I've spent the last 8 hours trying to get my head around, I'm pretty sure the answer is simple enough, but I just cannot work it out, any help would be much appreciated...even just a function name or something...

I have a very simple message board setup. The browse menu will look end up like below, all dynamically fed from a database, which is currently setup as:

[articleID] [articleDate] [articleText]
      23      2007-07-18  Lorem ipsum dolor....

The 'articleDate' field is a DATE type, formatted yyyy-mm-dd. All posts should be sorted ascending, latest first. I want nothing to be hard coded, so there could be 2 posts in any month, or 200, or there could be no posts in any year.

2007
June
 - #1
 - #2
August
 -#1
September
 -#1
 -#2

2008
January
 -#1
.
.
.
.
.
So on and so on.

So far, I've toyed with array_unique(), as well as multi-dimensional arrays, but I'm really not sure if this is the right approach. I'd post code but I'm not sure there's any point, what I'm really looking to find out is the method to use, rather than code snippets, so if anyone has achieved this, how did you do it?  I'm happy as to teach myself whatever I need to know, problem is I don't know what I need to know...

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");
}
}

Unexpected Order On Dynamic Select Menu
I've got a directory called 'potm' (picture of the month) that contains:

02.jpg
03.jpg
04.jpg

I'm dynamically constructing an 'archive' select menu that contains all the available pics. For some reason the select menu reads:

April
February
March

I've tried to sort the array, but it made no difference. PHP Code:

[PEAR:QuickForm] Dynamically Change A Dropdown Menu According To Another Menu?
I've been using QuickForm for a few months now and I am now given a
new challenge:

I've got a search form with a dozen of dropdown menus, the first
dropdown menu being "Brand". If you select either Brand A, B, C, D...
Z, the second dropdown menu "Model" must be dynamically changed to
model AA, AB, AC, AD..., according to the models manufactured by the
brand selected in the first box.

I've seen that done on quite a few sites, but never found if QuickForm
had a quick & clean way of doing that.

Getting Another Menu
how can I do to create another menu with the results from the options they choose?
For example, they are looking for their grades so they choose in a first menu the carreer, in other menu the grade, and then when they finish choosing the grade, It appear automaticaly in other menu all the names of the subjects concerned to te carreer and grade given.

Php Menu
How do I have The menu and the context information display at the same time? Code:

Populate One Menu From Another
I thought this would be simple and there would be advice / tutorials
everywhere for this, but now that I'm working on it, I can't find any
reference except for ASP or Javascript code. PHP/MySQL - 3 form select
menus: Project, Categories, Subcategories. When a Project is selected, the
Categories list is populated based on Project selected, then Subcategories
list is populated based on Category selected. I see this all over the Net,
but through 10 books, there isn't anything specific. I think I get lost
with some of PHP structure since I've been using DW - I end up editing most
of it in order to follow it, but DW works pretty good for getting initial
testing done. I just can't seem to find further guidance on this. So far I
have:

Drop Down Menu(add Cat)
I have DB to add category and forum to edit the terms that in the cat so I add this code in the edit forum to change the cat of the term by choose the cat from drop down menu
PHP Code:

Collapsing Menu
I have written the code to do this however I am completely at a loss to do one particular thing. To best explain what the problem is I will give you an overview of how the menu hangs together.

The menu looks like this:

Menu-submenu
I've to create a simple site with menu-submenu.

The submenu are shown in a "dropdown" object that use "<ul><li>"....

Here is the structure:

group1
menu1
menu2
group2
menu1
menu2
menu3
.....

by selecting the link group1, group1->menu1, group1->menu2 I'd like on a
left pane the submenus structure of the group1, but not the substructure of
the menu2 etc.

What's the simple way to create it ? I'd like to modify only once and have
this working on all my site (I use a simple template using a table).

Dropdown Menu
I want to upload a feild values into a dropdownmenu. can anyone help me how to write in php code.

Drop Down Menu
I have a page that uses php to look up specific fields in a specific table of a specific database based on the username. Using this, it creates a dropdown list of information belonging to that user. The fields in question each have 13 pieces of data. Based on what they click in the dropdown box, I need that specific data to pass onto hidden fields on the page. Code:

Drop Down Menu
I'm struggling to get this to work. It is suppose to show only $name and not $name and $email PHP Code:

Drop Down Menu
I am implementing a website with dreamweaver. I dont know much about
programming but I can handle scripts and manupilate.

does anyone know a website that i can get a free drop down menu script
to use on the website's navigation?

Template Menu
I'm trying to decide witch way to do my menu for my program.... see some menu will be accessed by certain users with certain power... but i cant seem to decide with way to do it because... the menu is also template based ( $template = new template( menu.shtml )) anyone has done this in a way to keep the template system integrated and only show certain menus according to there users prv?

Drop Down Menu
I have 2 drop down boxes on my site. I want the selection of the
first one to populate the second box.

Drop Down Menu
What i would like to do is look in a file and see what the name's of the files are in there and have them put in to a drop down menu. Dose some one know of a tutorial on this or how to do it?

Drop Down Menu
I have a problem with a drop down menu, I have 2 drop down menu's if 1 select in dropdown menu 1 a catagorie then I must give this to menu 2 and then there must be things in menu to with catagorie from menu 1 I just want when I clicked menu 1 the php file refreshed en gives the catagorie with the refreshed file but HOW?

Menu/submenu
I wish to make a menu (in php), and every time a menu-item is selected, a
sub-menu will be visible.

Triple Menu
I'm going to have a website that will have a very dynamic menu structure (one that could change every few minutes) and it is essential that everytime the menu is built, the updated database entries are included.

Background:  The site is a homework study site that gives study tools, etc.  So lets say that i want to look up the Math (subject or "class"), Pre-Algebra ("course"), CPM ("curriculum"), i would first select Math in the first drop down menu, then Pre-Algebra in the second, and then CPM in the third.  In the second and Third boxes however, there will be other courses and curriculums to choose from.  Those will be updated very regularly and i do not want to do this manually. Code:

Drop Down Menu?
Im looking for a script for a site im making that will make a drop down menu which I can customise the color of. Simple, like a border and background color, but is friendly with all types of IE explorer.

Drop Down Menu
I am using the following code to loop 12 months backwards from the current month in a drop down list - using the get method.

I'm having difficulties trying to get the option selected once I have submitted the form.  For example, I am using this to filter months, so once a month has been selected and submitted, the first option in my drop down list is displayed and not the one that was selected and submitted. So basically, I need to be able to select a month > hit submit and when the form returns, have the drop down list show me the selected item. Code:

Using Jump Menu
I am using a jump menu to select multiple drop down boxes in a form which are related to the choice you make in the first drop down box.  The problem is that the page reloads and everything before this tag is cleared.  I want to be able to repost the data.  I know that I need to use sessions in my code but I dont know exactly how to use them for this case. Code:

Drop Down Menu
i want a drop down menu that will select which database is needed for that page..

see i have a site im making for a clan that plays like 10 different games and i wanna have 1 index but the dropdown menu will be at the beginning and when a player goes to the site they can choose which game they play so they can check the news and stuff.. the drop down menu should choose which database is needed? can this be done or will i have to make 10 different index.php pages?

Drop Down Menu
does anyone have the code to have drop down navigation on a website?

Vertical Menu
anyone here has done a vertical menu using php with mysql database? something like this:

menu1
  > submenu1
  > submenu2
  > submenu3
menu2
  >submenu4
  >submen5

then when you click the menu it shows/ hide the submenu.

Array For Menu - Need Number Of Row.
I'm building a template class for a new website. For it to be a proper template I need the menu to be changeabel as well. So I tried adding to the menu array so I created a multi array, but then I couldn't get the name or the url out of it. Maybe I shouldn't use multiple arrays or maybe I should construct them differently, I just don't know. I need the line number for a javascript popup submenu.

Echoing Value To List Menu
Hi, I was wondering can I echo out value from db to list menu and how?

Php Drop Down Menu Variable
I have been playing with one script for more than two weeks. It is a simple poll script.
Once the user has selected from a drop down menu...it is mailed to me. The problem is that I only get the first word of their choice! That defeats the purpose of having the poll!

Echo Drop Down Menu
What I do is when the form is posted (php_self) it does its check and if there are errors, ie. user has not filled in required data, it takes them back to the form but the text fields are already filled in with what they have already typed.

But the drop down menus default back to the PLEASE CHOOSE option, how can I get my drop down menu to be what they have just selected. The reason I need this is there are 6 drop down menus for different things on the page and a user would get fed up having to reselect each one when they have not filled in a field. Code:

List Menu Choices?
Why does Multiple Choice List only report 1 value? i got a normal form: Code:

Populating A Drop Down Menu
How would I go about populating a Drop Down menu from data in MySQL? If you can show me wither a URL to learn this, or if you feel like telling me here, that would be great.

Query Using Drop Down Menu
can i query a table based on a drop down list?

i have a list of agents that i just want a simple drop down list to show the records they entered....

right now i just have the entire table showing all records in a html table format...but i want a drop down list so that if they only want to see the ones they entered, they can just select their name and poof...only theirs are shown...

1 Menu/12 Categories/1 PHP Page
I'm trying to replicate this type of php coding here.

<snipped url>

Basically, it's a simple menu on the left side that retrieves the info of a table (cat) and 12 different fields (ex: Area Guides, Business, etc...) containing web site addresses.

My question to you is, how can we use the same php page (res.php in this case) to retrieve the content of 12 different fields?

You see, I would have created 12 different php pages while this guy managed to use only one page to do it!

Could you please tell me how he did it and maybe paste me some php code to do something similar?

Advanced Dropdown Menu
I want to populate a dropdown menu with countries that are in one column of my table. I know how to do that, but I can't find how to eliminate multiple items. Some countries appear several times in different rows, but I only want each available country to be shown once in my dropdown list.

Drop Down Menu Refreshing
Sites that have mulitple drop down menus where 1 menu decides what the next menu will contacin, after you select the otion you need in menu 1 the next menu refreshs with its new contents and so on and so on..Is this done with Java?

Mysql / Dropdown Menu
what i am trying to do is to make a system with a few input pages and edit and read pages..

so right now i got the input/edit/read pages working. (yay) But now I want to have on 1 input page a dropdown menu that reads its information from the database. and that if i go to the page i can select a value out of the db and submit that inside my form and that it reminds the value if i view or edit the page.

So what i got now is a little system that is able to add/remove/edit a value inside a field called "drop01"

Well now i got a other input page called "input01.php" inside this script i want to have the dropdown menu that reads its values from the "drop01" field. PHP Code:

Expanding/collapsing Menu?
First off I know that this can be done in Javascript, but through all the versions I have been trawling through, none really work in IE and Netscape without a great deal of modification, or two entirely seperate pages for each version... this ideally I want to avoid. I'm only just getting into PHP but can appreciate its huge functionality, is there any way I can do this expanding/collapsing menu in PHP.

I'm not intending on anything spectacular, I would just like to have a dynamically generated list of headers/titles and then as you move the mouse over the header (or click on it, which would be preferable), some text appears below it, pushing the headers below it down (kind of like the Webmonkey navigation but without the links, and images aren't essential either). May be a floating box with the content in is the answer but I have an aversion to pop-ups and will avoid them if at all possible.

Right-click Menu Change
Is there a possibility to change/define what will appear in menu after
right-clicking on text input box ?
If not - how to do this ?



Autoselecting A Value In A Dropdown Menu
I'm revamping my sites administration panel and I put in a dropdown menu to select the section to administrate (it was a LOT better than the list of links I had before, I'll probably update it some more though) and I want to know how I can autoselect whatever page I'm on in the dropdown menu, for example, here's the menu: Code:

Can You Read A Value Into A List Menu?
a system i am developing has both a user and an admin side. The user can add a record and then the status of this is initially set to a fixed value.

What I am wondering is, if i stick with a list of say 4 possible status', how can i get whatever status the admin changes the record to to be "sticky" on the menu the next time he looks at the call, as opposed to the menu showing the default value set in dreamweaver?

Multiple Dropdown Menu
i attemp to design a drop down menu that call up data from a table for each drop down menu. Code:

Updating SQL From Drop Down Menu
i am trying to change a php asset program to include another drop down menu ,
I have created the drop down and it shows the correct entries from Audit in sql , the process is that the user completes the php form for a new asset then clicks save to enter it to the database , the details below adds another drop down menu once they have selected the correct value i do not know how to capture this and write it back to the sql database . Code:


Copyright © 2005-08 www.BigResource.com, All rights reserved