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>


