Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a Database-driven menu

Status
Not open for further replies.

kathryn

Programmer
Apr 13, 2000
776
US
Good afternoon. I am a newbie at CF, so please bear with me.

We are creating the company intranet and I am working on the home page. I am trying to create a main menu/sub menu from a database, to avoid hardcoding and to make maintenance easier. I have created the DSN, and the query and the CFQuery and CFOutput work fine. They generate a main menu like this:

Departments
Applications
News & Events
Help

However, I want to write code on the OnMouseOver event,and I don't think that I can get to it for the individual members of a single CFOutput command. When a user moves his or her mouse over an item in the main menu, I would like the item to become bold and a sub item to appear to the right. I can write the query to get the submenu item, based on the ID of the item that the mouse is over, if I can retrieve the item the mouse is over.

I'm sure that I am not the first to try this. I would greatly appreciate any ideas, war stories, references, or resources. [sig]<p>Kathryn<br><a href=mailto: > </a><br><a href= > </a><br> [/sig]
 
Hi!

You cant manage event using CF you will have to use javascript and DHTML layer for your sub-menus.

CF is server side and cant handle event thrown on the client side.

You will have to use javascript and DHTML. You would have to create all your menus and sub-menus(in layers) dynamicaly using CF and then send the page to the client with all the pre-generated information and on mouse-over close or open the good layer.

I've already did this... if you are really a CF newbie it could be really complicated... You must know CF, javascript, DHTML and use them all at the same time.

Another option would be to try to find one of those menus on the net. On like every javscript ressource page you can find one, try to find one that fit your needs...

If someone else got an idea please help her!
I dont think my post will help her much ;-)

Chris
[sig][/sig]
 
Try getting a evaluation copy of Macromedia's Dreamweaver from their web site. One useful functions of this HTML editor is to allow you to create menus with OnMouseOvers really easily.

Hope this helps.

Klotzki [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top