Connecting Tech Pros Worldwide Help | Site Map

Problem, need help.

Bigbuddha
Guest
 
Posts: n/a
#1: Jul 20 '05
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

BigRed
Guest
 
Posts: n/a
#2: Jul 20 '05

re: Problem, need help.


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";
Bigbuddha
Guest
 
Posts: n/a
#3: Jul 20 '05

re: Problem, need help.


BigRed wrote:
[color=blue]
> 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";[/color]

I'll give it a try tonight

thansk!

--
Bigbuddha
www.bigbuddha.be

Closed Thread