It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

re: javascript breadcrumb problem...help!

re: javascript breadcrumb problem...help!

Postby taigar on Wed Apr 25, 2007 3:42 pm

Hi,

I got this code from the internet and I'm having some trouble creating hyperlinks using Array. For some reason, it's only showing the text name. If anyone can help me it would really make my day!

Thank you in advance beautiful people.

Here's the code:

<script language="JavaScript" type="text/javascript">

var text = new Array()
var url = new Array()

text[0] = "Home" ;
url[0] = "default.htm";
text[1] = "Text 1" ;
url[1] = "link1.htm";
text[2] = "Text 2" ;
url[2] = "link2.htm";
text[3] = "Text 3" ;
url[3] = "link3.htm";
text[4] = "Text 4" ;
url[4] = "link4.htm";
text[5] = "Text 5" ;
url[5] = "link5.htm";
text[6] = "Text 6" ;
url[6] = "link6.htm";
text[7] = "Text 7" ;
url[7] = "link7.htm";

var crouton = new Array("1","2","4","7")

document.write(""+text[0]+""+" > ")

for (i = 0; i < crouton.length; i++){ if (i < crouton.length - 1)

{

document.write(""+text[crouton[i]]+""+" > ");

}

else

{
document.write(""+text[crouton[i]]+"" )
}

}

</script>
taigar
 
Posts: 0
Joined: Wed Apr 25, 2007 2:35 pm

Who is online

Users browsing this forum: No registered users and 2 guests