By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,480 Members | 1,808 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,480 IT Pros & Developers. It's quick & easy.

Problem, need help.

P: n/a
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

Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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";
Jul 20 '05 #2

P: n/a
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

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.