I did some modifications to this code and the only thing I cant figure out is, which I think should be, a simple if else loop. Here is my code:
This is the for loop, which is ok:
[code=php]
for(var i=0; i<sURL.length; i++) {
if(i==0 && i<sURL.length-1) document.write(‘<a href=”‘+(bURL+=sURL[i])+'”>’+sURL[i]+'</a> > ‘);
Here is the problem, I want the first “else if” statement to execute only when it is true. If not then it just executes the second one, with the last “else” statement.
[code=php]
else if(sURL[i].length == document.title.length) document.write(“<b>”+document.title);
else if(i<sURL.length-1) document.write(‘<a href=”‘+(bURL+=”/”+sURL[i])+”/index.jsp”+'”>’+sURL[i]+'</a> > ‘);
else document.write(“<b>”+document.title);
}