f



Problem, need help.

I have found this nice menu form my website www.folkspot.be
But it has a usability problem.
When i click "crew" for example, the submenu "crew" opens and i have to 
click the submenu to get to the page. As you notice, this is a click to 
many. As you can see this is the case in several items. Some do have 
subitems and work fine. I'm to much of a newbee in javascript to figure 
this out.

Can someone please help me fix this problem?

thanks.

-- 
Bigbuddha
www.bigbuddha.be
www.folkspot.be

0
Bigbuddha
12/12/2003 9:46:57 AM
comp.lang.javascript 38370 articles. 2 followers. javascript4 (1315) is leader. Post Follow

2 Replies
565 Views

Similar Articles

[PageSpeed] 55

Open the SLIDING_MENU.JS file and look for the function
"write_menu()".  Scroll down until you see the variable "csmc = 0;". 
The next line should be a command starting out like this:

   document.write("<div class='men' style='top.....


Highlight and COPY the code below.  Find that
"document.write("<div......");" command as stated above and copy over
the ENTIRE line with the new code.


//START YOUR COPY HERE
if (la[2] != "")
    {
      document.write("<a href='"+la[2]+"'
style='text-decoration:none;'");
      if (la[3] != "") document.write(" target='" + la[3] + "' ");
    }
     
    document.write("<div class='menu'
style='top:"+mn+";height:"+height+"' id='down"+smc+"'
onclick='prepare("+smc+","+mni+")'>&nbsp;"+ la[1] + "</div>");
    
    if (la[2] != "") { document.write("</a>"); }
//END YOUR COPY HERE



You're done!!!  All this does is wrap that main menu item with a <A>
tag IF you add a link in your LINK array.  Here are your new choices
when adding a link.  Choice 3 is what you wanted....

   //MAIN MENU ITEM - SUB-MENU LINK.
       Link[0] = "0|Home|";
       Link[1] = "1|Home|index.html|_top";

   //MAIN MENU ITEM - NO LINK
       Link[0] = "0|Home|";

   //MAIN MENU ITEM - LINKED WITHOUT SUB-MENU
       Link[0] = "0|Home|home.html|_top";
0
bmoeller
12/12/2003 7:16:09 PM
BigRed wrote:

> Open the SLIDING_MENU.JS file and look for the function
> "write_menu()".  Scroll down until you see the variable "csmc = 0;". 
> The next line should be a command starting out like this:
> 
>    document.write("<div class='men' style='top.....
> 
> 
> Highlight and COPY the code below.  Find that
> "document.write("<div......");" command as stated above and copy over
> the ENTIRE line with the new code.
> 
> 
> //START YOUR COPY HERE
> if (la[2] != "")
>     {
>       document.write("<a href='"+la[2]+"'
> style='text-decoration:none;'");
>       if (la[3] != "") document.write(" target='" + la[3] + "' ");
>     }
>      
>     document.write("<div class='menu'
> style='top:"+mn+";height:"+height+"' id='down"+smc+"'
> onclick='prepare("+smc+","+mni+")'>&nbsp;"+ la[1] + "</div>");
>     
>     if (la[2] != "") { document.write("</a>"); }
> //END YOUR COPY HERE
> 
> 
> 
> You're done!!!  All this does is wrap that main menu item with a <A>
> tag IF you add a link in your LINK array.  Here are your new choices
> when adding a link.  Choice 3 is what you wanted....
> 
>    //MAIN MENU ITEM - SUB-MENU LINK.
>        Link[0] = "0|Home|";
>        Link[1] = "1|Home|index.html|_top";
> 
>    //MAIN MENU ITEM - NO LINK
>        Link[0] = "0|Home|";
> 
>    //MAIN MENU ITEM - LINKED WITHOUT SUB-MENU
>        Link[0] = "0|Home|home.html|_top";

I'll give it a try tonight

thansk!

-- 
Bigbuddha
www.bigbuddha.be

0
Bigbuddha
12/15/2003 8:32:38 AM
Reply: