Link to home
Start Free TrialLog in
Avatar of johnny007
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
Avatar of Saqib Khan
Saqib Khan
Flag of United States of America image

Ddi you try DynamicDrive.com and Google? there are lot bunch of Free Scripts.
Avatar of Kiran Paul VJ
hi...

if you are using dreamweaver to create website, you can create the menus easily. i use dreamweaver to create menus

kiranvj
ASKER CERTIFIED SOLUTION
Avatar of Esopo
Esopo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rockmansattic
rockmansattic

Here is one that I have used for a long time.  Works well
<head>
<script language="JavaScript" type="text/javascript">
function breadCrumbs(base,delStr,defp,cStyle,tStyle,dStyle,nl) {
loc=window.location.toString();subs=loc.substr(loc.indexOf(base)+base.length+1).split("/");
 document.write('<a href="'+getLoc(subs.length-1)+defp+'" class="'+cStyle+'">Home<\/a>  '+'<span class="'+dStyle+'">'+delStr+'<\/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+'">'+delStr+'<\/span> ');}
 if (nl==1) document.write("<br>");document.write('<span class="'+tStyle+'">'+document.title+'<\/span>');
}
function makeCaps(a) {
  g=a.split(' ');for (l=0;l<g.length;l++) g[l]=g[l].toUpperCase().slice(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">breadCrumbs("http://your_home_directory",">>","index.html","css_style","css_style","css_style","0");</script>
</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)