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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help finding a method in written code

Status
Not open for further replies.

link9

Programmer
Nov 28, 2000
3,387
US
Hello all --

I'm hoping that one of you super-duper coding types can help me find a method in this script --

Here's the situation --
I got a script from dynamicDrive.com (a great site, by the way), and the script works great. It's a dhtml pull down menu.

The issue here is that I am using the script for a demo site to show to clients, and the "powers-that-be" have said that they would like for a little demo of how to use the menu to happen when a user visits the site. They said that the first time they saw the site, they didn't know what the bar at the top was for, and wouldn't have guessed to put their mouse on it to get options (bear with me, I know it's stupid--)

So I racked my brain and have decided that if I can come up with a way to call the method that drops the little menu down for say two seconds, and then drops another down for another two seconds, then that would "clue them in", and this would happen without me having to make some little flash movie that would show them what to do.

Basically, they come on the site, and menu1 pops down, waits two seconds, pops up --

See what I'm getting at?

I know how to stall the script for two seconds, but am having trouble finding the method to call in order to get that menu to drop down....

So that brings me to you -- the experts. I am hoping that someone will follow the link that I have posted below and take a look at the script that builds and renders the navigation bar. It is well commented, and would be easy for someone who does this for a living to follow and point out what I'm missing. I'm just not an expert at javascript.

So, please help me. :)

here's the link --

Thanks in advance for any insight you can provide.
Paul Prewett
 
Just moving it back to the top soes no one forgets about it. I'm really stumped here.

If I can elaborate further, please let me know...

thx again
paul
 
Just look at your objects that receive the onmouseover event and see what function is called: like
Code:
onmouseover="menu_function('arg')"
. If you have, say six menu items at the top, each will call that same function but with a different argument, such as
Code:
onmouseover="menu_function('main')", onmouseover="menu_function('services')", onmouseover="menu_function('products')"
, etc...

Now make a small block of code (not a function) that calls the menu function six times, once for each menu area, with a timer in between. Just place that in a <script> tag and it will run upon loading of your page.

You shouldn't have to get into the code for all the menu stuff at all.
 
Actually, the only place I found in the code that made any reference to mouseover was a part where it said something to the effect of:

this.menus.items[j].dmmyLayer.mouseover = navBarMenuOn

this being my navbar, 'myNavBar1', and so I tried:

myNavBar1.menus[0].items[0].navBarMenuOn

and all the other combinations, including trying to add in that dmmyLayer (which I just couldn't trace down to see what it was) --

I just couldn't get anything to work, and after all day at it, I just gave in and made a flash movie that pops up upon entry and shows them what to do. It wasn't what I wanted, but it serves the purpose quite nicely.

Anywho -- if anyone who is really good with writing and understanding javascript would like to delve in and test to find out how to do it, that would be great. I'd still like to know just for the learning experience.

thx for the input everyone --
paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top