Foros del Web » Programando para Internet » Javascript »

breadCrumbs

Estas en el tema de breadCrumbs en el foro de Javascript en Foros del Web. Buenas, ando en busca de ayuda pues tengo este script : @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); Código Javascript : Ver original <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 ...
  #1 (permalink)  
Antiguo 01/09/2012, 05:33
 
Fecha de Ingreso: marzo-2011
Mensajes: 115
Antigüedad: 13 años, 1 mes
Puntos: 0
breadCrumbs

Buenas,

ando en busca de ayuda pues tengo este script :
Código Javascript:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  5. <title>Documento sin t&iacute;tulo</title>
  6. <script language="JavaScript">
  7. function breadCrumbs(base,delStr,defp,cStyle,tStyle,dStyle,nl) { // by Paul Davis - http://www.kaosweaver.com
  8. loc=window.location.toString();subs=loc.substr(loc.indexOf(base)+base.length+1).split("/");
  9.  document.write('<a href="'+getLoc(subs.length-1)+defp+'" class="'+cStyle+'">Inicio</a>  '+'<span class="'+dStyle+'">'+delStr+'</span> ');
  10.  a=(loc.indexOf(defp)==-1)?1:2;for (i=0;i<(subs.length-a);i++) { subs[i]=makeCaps(unescape(subs[i]));
  11.  document.write('<a href="'+getLoc(subs.length-i-2)+defp+'" class="'+cStyle+'">'+subs[i]+'</a>  '+'<span class="'+dStyle+'">'+delStr+'</span> ');}
  12.  if (nl==1) document.write("<br>");document.write('<span class="'+tStyle+'">'+document.title+'</span>');
  13. }
  14. function makeCaps(a) {
  15.   g=a.split(' ');for (l=0;l<g.length;l++) g[l]=g[l].toUpperCase().slice(0,1)+g[l].slice(1);
  16.   return g.join(" ");
  17. }
  18. function getLoc(c) {
  19.   var d="";if (c>0) for (k=0;k<c;k++) d=d+"../"; return d;
  20. }
  21. </script>
  22. </head>
  23.  
  24. <body>
  25. <script language="JavaScript">breadCrumbs("localhost","|","index.php","None","None","None","0");</script>
  26. </body>
  27. </html>

el cual funciona bien., pero tengo un pequeño inconveniente. solo tiene link a la pagina de inicio. a las otras paginas que muestra su nombre no tiene link?

si alguien me puede ayudar, muchas gracias!!!

Etiquetas: breadcrumbs, funcion, html, php
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 19:59.