Foros del Web » Programando para Internet » Javascript »

Ayudenme a modificar este Script

Estas en el tema de Ayudenme a modificar este Script en el foro de Javascript en Foros del Web. Hola amigos, ayudenme a modificar este script que muestra los ultimos post de un foro, pero si se fijan le eh agregado esto: Código PHP: ...
  #1 (permalink)  
Antiguo 11/06/2008, 14:00
Avatar de sandrox23  
Fecha de Ingreso: abril-2005
Ubicación: Lima - Peru
Mensajes: 274
Antigüedad: 19 años
Puntos: 0
Exclamación Ayudenme a modificar este Script

Hola amigos, ayudenme a modificar este script que muestra los ultimos post de un foro, pero si se fijan le eh agregado esto:

Código PHP:
<a title=""+threads[x].title+"\" ......> 
Esto kiere decir q al pasarle el mouse te sale el titulo del tema, lo k yo kiero hacer es que al pasarle el mouse a cada titulo me muestre todo el titulo completo y no recortado.

Osea que la marquesima me muestre los titulos cortados eso es normal, pero al pasarle el mouse quiero que me muestre todo el titulo completo.

Script
Cita:
<MARQUEE behavior="scroll" align="left" direction="up" height="100" scrollamount="2" scrolldelay="5" onmouseover="this.stop()" onmouseout="this.start()">
<script type="text/javascript" src="http://www.tuweb.com/forum/external.php?type=js&lastpost=1&forumids=11,14,20, 22,9,15,21,8,18,13,19"></script>
script language="" type="text/javascript">
<!--
var max = 10;
if(threads.length < max)
max = threads.length;
for(x = 0; x < max; x++)
{
if (threads[x].title.length > 23)
{
threads[x].title = threads[x].title.substring(0, 23) + '...';
}
document.writeln("<img height=\"1\" src=\"images/right_news_line.gif\" width=\"251\"><img class=\"inlineimg\" src=\"images/right_news_bullet.gif\" alt=\"ForoMU\" border=\"0\" />&nbsp;<a target=\"_blank\" href=\"http://www.tuweb.com/forum/showthread.php?t="+threads[x].threadid+"\" title=\""+threads[x].title+"\">"+threads[x].title+"</a> <span class=\"t_news_b\">("+threads[x].poster+")</span><br />");
}
//-->
</script></MARQUEE>
Espero su ayudita.

Gracias
__________________
diseniando ........
  #2 (permalink)  
Antiguo 11/06/2008, 14:33
Avatar de spider_boy  
Fecha de Ingreso: diciembre-2003
Ubicación: Chile
Mensajes: 1.855
Antigüedad: 20 años, 4 meses
Puntos: 89
Respuesta: Ayudenme a modificar este Script

Prueba esto...

Código PHP:


<!--
var 
max 10;
if(
threads.length max)
max threads.length;

var 
titulo;
for(
0maxx++)
{
if (
threads[x].title.length 23)
{
  
titulo[x] = threads[x].title.substring(023) + '...';
//threads[x].title = threads[x].title.substring(0, 23) + '...';
}
document.writeln("<img height=\"1\" src=\"images/right_news_line.gif\" width=\"251\"><img class=\"inlineimg\" src=\"images/right_news_bullet.gif\" alt=\"ForoMU\" border=\"0\" />&nbsp;<a target=\"_blank\" href=\"http://www.tuweb.com/forum/showthread.php?t="+threads[x].threadid+"\" title=\""+threads[x].title+"\">"+titulo[x]+"</a> <span class=\"t_news_b\">("+threads[x].poster+")</span><br />");
}
//--> 
Lo hice al ojo, disculpa si no funciona
__________________
Nunca te olvidaré mi negra hermosa. Te extraño demasiado.
  #3 (permalink)  
Antiguo 13/06/2008, 08:39
Avatar de sandrox23  
Fecha de Ingreso: abril-2005
Ubicación: Lima - Peru
Mensajes: 274
Antigüedad: 19 años
Puntos: 0
Respuesta: Ayudenme a modificar este Script

Gracias amigo por la ayuda, pero no me funciona :(

le agregue esto titulo = threads; .. alli si sale pero todo mal .. :( ... ayudame :(

Saludos
__________________
diseniando ........
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 21:58.