Anyone here know Javascript?

I have a site with a JavaScript (specifically DHTML) menu that appears on mouse over. However… every selection on every menu is categorized as an “object”. Each object has a different command, but the onmouseover = [go to wherever] command is universal in the menu!

I need major help.

OK, go to:

pudgygiant.iwebland.com

The index page has the menu. To get the scripts in a .zip format just go to pudgygiant.iwebland.com/scripts.zip

Help me please?
Oh yeah, forgot to say WHAT I needed help with. =P to me. I need the FIRST menu (the top layer, if you will) to me onmouseover , but I need the SECOND menu (the pseudopopup ones) to be onmousedown

~Pud

Sorry buster, but I 'aint gonna download a ZIP file without knowing you.

I think you want an ONCLICK in the second layer and you wanna lose the start up on my mail program when I mouse over the send email to tech support.

Sorry, but whatever problem you’ve got it 'aint gonna be solved by me.

Try a JS newsgroup.

I didn’t download the ZIP file, but I think I understand what you’re trying to do…

Anyway, I think you have a couple options. One thing is to give each object (are they really Objects in the script, or just layers or divs or something else?) a different name. Then in your function for the OnMouseOver, pass in “this,” which will pass in a reference to the function. Then just do a case statement to check the value of “this.name,” and then depending on the name, go onto the rest of the code for the function, or exit the function and do nothing. Ex:




<DIV NAME="x" onMouseOver="MyFunction(this);">Menu Title</DIV>

<SCRIPT LANGUAGE = JavaScript>
<!--

MyFunction(myObj){

switch (myObj.name){

    case "x":
         break;

    case "y":
        SomeOtherFunction();
        break;
 
     default:
         break;

}

}

//-->
</SCRIPT>


Another option, though it will only work for Internet Explorer, is to add another layer, or div, tag within the parts of the menu that you don’t want to have an onmouseover action. Ex:




<DIV NAME="x" onMouseOver="MyFunction(this);">Menu Title</DIV>

<DIV NAME="y onMouseOver="MyFunction(this);">
<SPAN NAME="spanY" onMouseOver="MyFunction2();">Menu Title2</SPAN>
</DIV>

<SCRIPT LANGUAGE=JavaScript>
!--

MyFunction(myObj){

//do whatever you want here

};

MyFunction2(){
   //This line will prevent the onMouseOver from being passed 
   //up to the Div Tag   
   window.event.cancelbubble;

}

//-->
</SCRIPT>


A few suggestions… I realize that you’re still testing things out, but when you finish the code you should definitely make the areas of your menu a lot smaller. You also should never force the browser to go to another page just by doing a MouseOver…make the user do a MouseClick if he’s going to be sent to another page, especially if its an entirely new site. Also, the menu doesn’t work in Netscape.
Check out the menu on this site. If you like that, I can give you the scripts for that type of menu.