|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
need help with show and hide function for menu
please help me with an expadable/collapsible menu.
I have expadable/collapsible menu(9 buttons)that does the following. when you mouseover one of the menu items a submenu opens vertically. The issue is that once you click on one of those sublinks and you are taken to that page the menu closes. I want the menu to remain open when you are taken to a new page of a submenu. example oif what I would like my menu to look like http://www.site-pro.com/promotion/ In my home page I added the code for the drop down menu. I know that for all the child pages I need to add logic tying page ids to divs to call the function generated by the editor used to create the dropdown menu. on the home page where this menu resides I have the code that triggers the motion of the drop down menu on all the child pages i have the same code as well but i added a line that seems to make it work. (Test_trigMenu1('Aboutmenu',1) this is the name of the main menu and the first submenu. But how can I make the others ones work? Can someone help me with a show and hide function so the menu remain open when you are in set of submenu pages? here are my other sub menu names. Test_trigMenu1('Bhmenu',1); Test_trigMenu1('Cancermenu',1); Test_trigMenu1('Commmenu',1); Test_trigMenu1('Cvimenu',1); Test_trigMenu1('Fbmenu',1); Test_trigMenu1('Hafmenu',1); Test_trigMenu1('Nsmenu',1); Test_trigMenu1('Wsmenu',1); Any help on this would be really appreciated. |
|
#2
|
|||
|
|||
|
Give me the code, I assume it is one html page right?
attach a zip to your next post ![]() EDIT: Give me the whole lot, I don't like creating working versions from snippets. |
|
#3
|
|||
|
|||
|
Here it is...As you will see the nav is included in this file...where i have the //MHS_trigMenu1('Aboutmenu',1); is where i figured i need the function...All your help will be immensely appreciated...
thanks... |
|
#4
|
|||
|
|||
|
I meant the HTML Version as in a view source from the Browser.
![]() Can't do much in the way of testing with all the Coldfusion stuff. Last edited by Nigorr : February 18th, 2003 at 07:31 PM. |
|
#5
|
|||
|
|||
|
Ok..
here it goes...html and txt |
|
#6
|
|||
|
|||
|
You trying to tell me this is what a user is going to see?
Code:
<TITLE>#pagename#</TITLE> <body leftmargin=0 topmargin=0 marginwidth="0" marginheight="0" bgcolor="ffffff" text="#defaultbodyfontcolor#" link="#defaultlinkcolor#" vlink="#defaultvlinkcolor#" alink="#defaultalinkcolor#" > Can I please have the version that doesn't have all the cold fusion in it. :P So run your web app off your server through the browser then do a File > Save As > and give me that HTML file. K? |
|
#7
|
|||
|
|||
|
Sorry I didnt think I had the nav file here till the last post....
thanks!! |
|
#8
|
|||
|
|||
|
OK,
I see what your after now. Ok this will work, not pretty but niether is the code thats all ready there. look for "CHANGE-NTO" Any probs ask. |
|
#9
|
|||
|
|||
|
I have a question....where you mean to:
//CHANGE-NTO function init() { MHS_setMenu1(0,40,10,'Botimage','HomeMenu','HomeSu bmenu','Homebut','Aboutmenu','Aboutsubmenu','About but','Bhmenu','Bhsubmenu','Bhbut','Cancermenu','Ca ncersubmenu','Cancerbut','Cvimenu','Cvisubmenu','C vibut','Ermenu','Ersubmenu','Erbut','Fbmenu','Fbsu bmenu','Fbbut','Hafmenu','Hafsubmenu','Hafbut','Ms menu','Mssubmenu','Msbut','Nsmenu','NsSubmenu','Ns but','Wsmenu','Wssubmenu','Wsbut','Azhlmenu','Azhl submenu','Azhlbut','Fpmenu','FpSubmenu','Fpbut','C ommmenu','Commsubmenu','Commbut') // Don't know anything about cf so what you want to do is grab the querystring parameter "menu" and sub its value in here MHS_trigMenu1('VALUE-HEREmenu',1) you mean this values the name of the menus.> so I would put MHS_trigMenu1('Bhmenu',1);and name all the menus? } also on the submenus links you wrote.... <!-- CHANGE-NTO --> <td><a href="fla%20calendars/body.cfm?id=42&menu=About">About </a></td> so I should include the link&menu=About" for each menu of the submenu I am referencing.... I hope youre around tomorrow when i can test this at work....but if you clarify this then its a start... Thanks for taking the time to help.....I do apppreciated it.. |
|
#10
|
|||
|
|||
|
well u know how you do id=42 and u grab 42 and match it to something an then display data in the body. Well same thing applies here.
menu=About grab the "About" value and stick it in where I put VALUE-HERE Got it?? As for the second part, u really not sure what I'm on about? cause I can't explain it in words. u on MSN? add me nigorr-AT-hotmail.c*m ALSO when posting code use the tags [ code ] [ /code ] (without the spaces) and post comments below, A hell of a lot easier to read Last edited by Nigorr : February 18th, 2003 at 09:17 PM. |
|
#11
|
|||
|
|||
|
One last thing....
code // MHS_trigMenu1('VALUE-HEREmenu',1) } to make sure i under stand i would write MHS_trigMenu1('About',1) and subquently add the same MHS_trigMenu1, for all the menus to expand? ps...i added you to MSN messenger... thank you and i hope sure this works... |
|
#12
|
|||
|
|||
|
No.
U r not coming accross as a developer here, am I right? Are u GUI expert and a "CODE?, wtf is that?" not trying to insult just trying to understand where u r at. k :P now. URL = http://domain.com/page.cfm?menu=About See the url. well see the bit that says menu well its "Value" is 'About'. so, when you sub this into VALUE-HERE MHS_trigMenu1('VALUE-HEREmenu',1) you get MHS_trigMenu1('Aboutmenu',1) Understand that?? it means then that the above is "Dynamic". so all you do is figure out how to sub values in there like when you do this Code:
<TITLE>#pagename#</TITLE> Then for each of your links you add "&menu=whatever-the-menu-name-is". am i making sense now? |
|
#13
|
|||
|
|||
|
Sorry that I seem a bit lost. but your instructions got me lost a bit..Its still not working...Any suggestions?
ps...Again thanks for taking the time to help! |
|
#14
|
|||
|
|||
|
Do you know Coldfusion? If i said go and make a website that runs off a database and uses Coldfusion on the server side, could you do it?
If the answer is no, then I think you are out of your depth here. I don't know coldfusion, so can't help with specific code. I know Java and ASP (server-side) | HTML/Javascript/CSS (client-side) So a Java example of what I'm suggesting is this. Code:
<%
// Get the menu we want open, from the querystring
String menuName = request.getParameter("menu");
%>
<html>
<head>
...........
<script>
.............
function init() {
................
MHS_trigMenu1('<%= menuName %>menu',1)
}
</script>
</head>
<body .............>
.................
<!-- CHANGE-NTO -->
<td><a href="fla%20calendars/body.cfm?id=42&menu=About">About </a></td>
................
</body>
</html>
A user then clicks on one of your menus, in this case "About". the URL then sent to the server would be this "http://domain.com/fla%20calendars/body.cfm?id=42&menu=About" Then the resulting HTML sent to the client, after the REQUEST has been processed by the server, would be this: Code:
<html>
<head>
...........
<script>
.............
function init() {
................
MHS_trigMenu1('Aboutmenu',1)
}
</script>
</head>
<body .............>
.................
<!-- CHANGE-NTO -->
<td><a href="fla%20calendars/body.cfm?id=42&menu=About">About </a></td>
................
</body>
</html>
Now see how the "About" value (from the URL's querystring parameter "menu") has been "SUB'd" into the resulting HTML??? If you don't understand this, then you are well and truly out of your depth here and, imho, you have no idea what Coldfusion is or how it works or anything to do with programing website's and your doing this cause some1 asked and you thought you could it? PLEASE TELL ME I'M WRONG!!!!! |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > need help with show and hide function for menu |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|