johnny007
asked on
How to create bread crumps type of menus
I wanted to create a "Bread Crumps" type of menus or cascading type of menus. The exact of example would be in the site http://launch.yahoo.com. When you roll over yourmouse it will list all the item in the drop down menus.
Can you give me a code sample on how to do that
Can you give me a code sample on how to do that
Ddi you try DynamicDrive.com and Google? there are lot bunch of Free Scripts.
hi...
if you are using dreamweaver to create website, you can create the menus easily. i use dreamweaver to create menus
kiranvj
if you are using dreamweaver to create website, you can create the menus easily. i use dreamweaver to create menus
kiranvj
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here is one that I have used for a long time. Works well
<head>
<script language="JavaScript" type="text/javascript">
function breadCrumbs(base,delStr,de fp,cStyle, tStyle,dSt yle,nl) {
loc=window.location.toStri ng();subs= loc.substr (loc.index Of(base)+b ase.length +1).split( "/");
document.write('<a href="'+getLoc(subs.length -1)+defp+' " class="'+cStyle+'">Home<\/ a> '+'<span class="'+dStyle+'">'+delSt r+'<\/span > ');
a=(loc.indexOf(defp)==-1)? 1:2;for (i=0;i<(subs.length-a);i++ ) { subs[i]=makeCaps(unescape( subs[i]));
document.write('<a href="'+getLoc(subs.length -i-2)+defp +'" class="'+cStyle+'">'+subs[ i]+'<\/a> '+'<span class="'+dStyle+'">'+delSt r+'<\/span > ');}
if (nl==1) document.write("<br>");doc ument.writ e('<span class="'+tStyle+'">'+docum ent.title+ '<\/span>' );
}
function makeCaps(a) {
g=a.split(' ');for (l=0;l<g.length;l++) g[l]=g[l].toUpperCase().sl ice(0,1)+g [l].slice( 1);
return g.join(" ");
}
function getLoc(c) {
var d="";if (c>0) for (k=0;k<c;k++) d=d+"../"; return d;
}
</script>
</head>
<body>
<script language="JavaScript" type="text/javascript">bre adCrumbs(" http://your_home_directory",">>","in dex.html", "css_style ","css_sty le","css_s tyle","0") ;</script>
</body>
rockman
<head>
<script language="JavaScript" type="text/javascript">
function breadCrumbs(base,delStr,de
loc=window.location.toStri
document.write('<a href="'+getLoc(subs.length
a=(loc.indexOf(defp)==-1)?
document.write('<a href="'+getLoc(subs.length
if (nl==1) document.write("<br>");doc
}
function makeCaps(a) {
g=a.split(' ');for (l=0;l<g.length;l++) g[l]=g[l].toUpperCase().sl
return g.join(" ");
}
function getLoc(c) {
var d="";if (c>0) for (k=0;k<c;k++) d=d+"../"; return d;
}
</script>
</head>
<body>
<script language="JavaScript" type="text/javascript">bre
</body>
rockman
The easiest and most flexible way if you're starting out, is the use fireworks. You can create a very nice dropdown menu right from the program with very little effort.
If your using dreamweaver then select your text or image and choose Behaviors, Show-Pop UP Menu. From here you can customize all of your Javascript Dropdown menus. Dreamweaver writes the code for you. You can even have sub menus.
I like to use this feature and then export the javascript to another file and call (link) it in my template page. This way you don't have the bulky javascript code on every page so your page load time is quicker. (but you don't have to export the javascript)
I like to use this feature and then export the javascript to another file and call (link) it in my template page. This way you don't have the bulky javascript code on every page so your page load time is quicker. (but you don't have to export the javascript)