Click to See Complete Forum and Search --> : Help Please with Slide-down menu script


brienb
12-15-2003, 02:09 PM
Can anybody help me?
I tried pasting the script given at http://javascript.internet.com/navigation/slide-down-menu.html

However, when I followed the instructions given, the menu does not show up on my webpage.

Any ideas?

havik
12-15-2003, 02:20 PM
According to this section of code:

<script language="JavaScript" src="sliding_menu.js"></script>

there exists an external javascript file that you must get in order for the menu to work correctly. Unfortunately, there appears to be no link at this time that allows you to download that .js file.

The file is retrievable though, just enter the following url into your browser:
http://javascript.internet.com/navigation/sliding_menu.js

A prompt window will pop up. Choose to save the file as "sliding_menu.js". This now should work when testing on your computer (w/o internet connection).

brienb
12-16-2003, 08:07 AM
Is there a way I can change this script so that when the mouse rolls over the main categories the submenus will appear without having to actually click on the main categories?

havik
12-16-2003, 11:56 AM
I'm assuming you got it to work correctly?

To get the menu to change on rollover, locate the following code in the sliding_menu.js file:
csmc = 0;
document.write("<div class='menu' style='top:"+mn+";height:"+height+"' id='down"+smc+"' onclick='pull_down("+smc+","+mni+")'>&nbsp;"+ la[1] + "</div>");
self_menu[smc] = new Array(mn,height,0,mni);

and make the following changes that appear in red:
csmc = 0;
document.write("<div class='menu' style='top:"+mn+";height:"+height+"' id='down"+smc+"' onmouseover='pull_down("+smc+","+mni+")'>&nbsp;"+ la[1] + "</div>");
self_menu[smc] = new Array(mn,height,0,mni);

brienb
12-16-2003, 01:26 PM
One last question. It's a 2 parter. First, what do I need to do to keep the last category of links from automatically appearing when the page loads. Secondly, how can I make the speed of the slide down lightning quick. Your help is much appreciated. Thanks

havik
12-17-2003, 04:08 PM
This script is poorly documented but I was able to find a quick fix to stop the last row from displaying when loaded.

The following code is from the example:
[Code]
Link[8] = "0|Scripts";

Link[9] = "1|Asp|http://www.javascriptsource.com|";

Link[10] = "1|JavaScript|http://www.javascriptsource.com|";

Link[11] = "0|Links";

Link[12] = "1|JavaScript sites|http://www.javascripts.com|blank";

startup(4);
[Code]

Notice the call to the startup method as the end? The number 4 is a parameter stating the number of rows in the menu. If you change this parameter to the number of rows plus 1, the menu will stop displaying the last row and still work properly and error free.

example: If you have 4 rows, pass 5 as the parameter.

In regards to speeding up the slides, I have analyzed the code but will re-check when I am less pressed for time.

ritu1
12-22-2003, 12:07 AM
Is there is any way in this script by which i am able to show only the options of one button at a time.i.e if i move the mouse on some other button it pulls up the options of other button if any open.at a time only one button is open.

Thanx in advance

Regards
ritu

ritu1
12-22-2003, 10:22 PM
the script i am using is

http://javascript.internet.com/navi...-down-menu.html

urgent help!!!!!

ritu1
12-22-2003, 10:46 PM
havik can u also tell me how to control the speed in this script

ritu1
12-25-2003, 11:45 PM
Please help me urgent if anybody knows the sol. of my problem

ritu1
12-30-2003, 03:36 AM
bump

ritu1
01-02-2004, 12:52 AM
buzz

nevermind
03-03-2005, 12:56 PM
no one answered brienb's question... how do you speed up the sliding sliding_menu.js ? the speed variable doesn't do a damn thing.

Pittimann
03-03-2005, 01:09 PM
Hi!Originally posted by nevermind
the speed variable doesn't do a damn thing. Set it to 1000 for fun instead of the default value of 50 and you will see: it DOES something.

I understand, what you are talking about, because the value of that variable being quite low
you'll not see a difference, but changing that would require the rewriting of almost the entire script.
Would you be willing to do so?

Cheers - Pit

nevermind
03-03-2005, 01:13 PM
oh great, it SLOWS it DOWN FURTHER.

what a POS script.

nevermind
03-03-2005, 01:14 PM
I don't suppose there's a decent script out there to replace sliding_menu.js?

Pittimann
03-03-2005, 01:16 PM
Hi!

Why do you shout at me? I did not write the script and I would not use it either.

Write a better (faster?) one yourself or ask someone to do it.

Cheers & good luck! Pit

nevermind
03-03-2005, 01:34 PM
I didn't shout, I exclaimed.. grab a spine.

as you notice, I did ask for a replacement... obviously this has been considered on this list before. what have others used instead?

Pittimann
03-03-2005, 01:42 PM
Hi!

As far as I know, nobody ever asked for a replacement (but I do not know almost 60,000 threads). I have seen people asking for modifications. And I do not know what 'others used instead'. I would never use a navigation depending on js and if I wanted to enhance a site with a js menu, I would write it.

Maybe I'll play with the speed of the menu in question later. I am at 8:40 pm and no dinner in my belly yet and while preparing, eating and digesting it, I'd only play with tiny little questions.

There are plenty of others here who can do what you request. Maybe someone also wants to.

Regards - Pit