...

View Full Version : Need Breadcrumbs separator help



suttonbear
06-23-2004, 03:21 PM
I'm using code I got from this site for breadcrumbs, but I want to change the separators from "/" to ">". Am not a coder and I'm having trouble. Please help! Thanks.

<SCRIPT LANGUAGE="JavaScript">
<!--

//Bread crumb script - Kevin Lynn Brown
//Duplicate directory names bug fix by JavaScriptKit.com
//Visit JavaScript Kit (http://javascriptkit.com) for script

var path = "";
var href = document.location.href;
var s = href.split("/");
for (var i=2;i<(s.length-1);i++) {
path+="<A HREF=\""+href.substring(0,href.indexOf("/"+s[i])+s[i].length+1)+"/\">"+s[i]+"</A> / ";
}
i=s.length-1;
path+="<A HREF=\""+href.substring(0,href.indexOf(s[i])+s[i].length)+"\">"+s[i]+"</A>";
var url = window.location.protocol + "//" + path;
document.writeln(url);
//-->
</script>

<p align="left"><font face="arial" size="-2">This free script provided by <a href="http://javascriptkit.com">JavaScript Kit</a></font></p>

Willy Duitt
06-23-2004, 03:26 PM
Change this line:



From: path+="<A HREF=\""+href.substring(0,href.indexOf("/"+s[i])+s[i].length+1)+"/\">"+s[i]+"</A> / ";

To: path+="<A HREF=\""+href.substring(0,href.indexOf("/"+s[i])+s[i].length+1)+"/\">"+s[i]+"</A> > ";

suttonbear
06-23-2004, 03:51 PM
Thanks so much. I figured it would be something pretty simple if you knew your code. :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum