JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 18th, 2003, 11:04 AM
laridev laridev is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Miami
Posts: 29 laridev User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old February 18th, 2003, 07:36 PM
Nigorr Nigorr is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Brisbane, Australia
Posts: 78 Nigorr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
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.

Reply With Quote
  #3  
Old February 18th, 2003, 08:01 PM
laridev laridev is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Miami
Posts: 29 laridev User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy

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...
Attached Files
File Type: zip body.zip (7.3 KB, 1150 views)

Reply With Quote
  #4  
Old February 18th, 2003, 08:29 PM
Nigorr Nigorr is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Brisbane, Australia
Posts: 78 Nigorr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
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 08:31 PM.

Reply With Quote
  #5  
Old February 18th, 2003, 08:35 PM
laridev laridev is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Miami
Posts: 29 laridev User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Ok..
here it goes...html and txt
Attached Files
File Type: zip body.zip (14.6 KB, 1011 views)

Reply With Quote
  #6  
Old February 18th, 2003, 08:39 PM
Nigorr Nigorr is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Brisbane, Australia
Posts: 78 Nigorr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
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?

Reply With Quote
  #7  
Old February 18th, 2003, 08:47 PM
laridev laridev is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Miami
Posts: 29 laridev User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sorry I didnt think I had the nav file here till the last post....
thanks!!
Attached Files
File Type: zip menu_nav.zip (5.5 KB, 1042 views)

Reply With Quote
  #8  
Old February 18th, 2003, 09:47 PM
Nigorr Nigorr is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Brisbane, Australia
Posts: 78 Nigorr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
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.
Attached Files
File Type: zip menu_nav1.zip (5.6 KB, 1074 views)

Reply With Quote
  #9  
Old February 18th, 2003, 10:08 PM
laridev laridev is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Miami
Posts: 29 laridev User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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..

Reply With Quote
  #10  
Old February 18th, 2003, 10:12 PM
Nigorr Nigorr is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Brisbane, Australia
Posts: 78 Nigorr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
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 10:17 PM.

Reply With Quote
  #11  
Old February 18th, 2003, 10:28 PM
laridev laridev is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Miami
Posts: 29 laridev User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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...

Reply With Quote
  #12  
Old February 18th, 2003, 11:17 PM
Nigorr Nigorr is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Brisbane, Australia
Posts: 78 Nigorr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
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>
you don't get #pagename# as the title you get "Homepage" or something.

Then for each of your links you add "&menu=whatever-the-menu-name-is".

am i making sense now?

Reply With Quote
  #13  
Old February 19th, 2003, 03:20 PM
laridev laridev is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Miami
Posts: 29 laridev User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy

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!

Reply With Quote
  #14  
Old February 19th, 2003, 07:20 PM
Nigorr Nigorr is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Brisbane, Australia
Posts: 78 Nigorr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
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!!!!!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > need help with show and hide function for menu


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap