Avatar Image
Usuario habitual
Usuario habitual

Bueno, Ya que estoy, otra pregunta con php & Javascript.

Mira, tengo un javascript que hace un marquee UP de los banner que yo le ponga.
Bien, entonces mediante php, se crea un registro de banners y se guardan las rutas en el Servidor SQL.
Entonces, a la hora de ejecutar el javascript, lo inserto en un codigo php que hace las query necesarias para saber los banner que tiene que poner y todo eso.
Pero a la hora de sacar uno y luego otro no puedo.
Me voy a explicar. he conseguido hacer que salgan todos mis banner, pero por alguna razon, salen todos al mismo tiempo.
Mirad el efecto deseado; los banner van subiendo ordenadamente pero uno despues del otro.
El efecto deseado
El efecto conseguido es este : Todos al mismo tiempo
Efecto conseguido
Lo veis ahora?
el codigo del efecto es este:

Codigo:

document.write("<marquee direction='up' height='50' align='center' scrollAmount='2' onmouseover='this.stop()' onmouseout='this.start()' name='scroll_minibanners' id='scroll_minibanners'><div align='center'>&quot;
document.write("<a href=http://www.clangatsu.com' target='_blank'><img src='http://www.clangatsu.com/foros/images/links/logo_88x31.gif' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='phpbb2.de [Title: Clan Gatsu | Visits: x]' onerror=this.src='no.png';></a><br><br>&quot;
document.write("</div></marquee>&quot;
document.write("<div align='center'>&nbsp;</a>&nbsp;&nbsp;</div>&quot;

Esta es la parte que se tiene que repetir tantas veces se desee que salga un banner.

Codigo:
document.write("<a href=http://www.clangatsu.com' target='_blank'><img src='http://www.clangatsu.com/foros/images/links/logo_88x31.gif' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='phpbb2.de [Title: Clan Gatsu | Visits: x]' onerror=this.src='no.png';></a><br><br>&quot;

y mediante php podemos hacerlo automatico.
Codigo:

document.write(" <a href='http://www.clangatsu.com/foros/links.php?action=go&link_id=<? echo$id[link_id]; ?>' target='_blank'><img src='<? echo $logo[link_logo_src]; ?>' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='[Titulo:<? echo $posts[link_title]; ?>|Visitas:<? echo $hits[link_hits]; ?>]' onerror=this.src='/images/no.jpg';></a><br><br>&quot;

Pero, a la Hora de Decirle que repita este ultimo code que le acabo de poner, estoy obligado a decirle que repita el encabezado y el pie. entonces se ponen todos a la vez.
No se si me he explicado, al menos lo he intentado. porfavor ayuda.
Gracias.
User 28318
User 28318
Machacateclados
Machacateclados

este es el deseado:
http://www.clangatsu.com/gts_ban_original.php

aparecen unos document.write que sospecho no deberían aparecer; su codigo es:

document.write("<marquee direction='up' height='50' align='center' scrollAmount='2' onmouseover='this.stop()' onmouseout='this.start()' name='scroll_minibanners' id='scroll_minibanners'><div align='center'>&quot;
document.write("<a href='link.php?bannerlink=1' target='_blank'><img src='http://www.clangatsu.com/foros/images/links/logo_88x31.gif' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='phpbb2.de [Title: phpbb2.de | Visits: 109]' onerror=this.src='no.png';></a><br><br>&quot;
document.write("<a href='link.php?bannerlink=2' target='_blank'><img src='http://www.anime-station.net/bannersbotones/boton6.gif' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='Forumimages.com [Title: Forumimages.com | Visits: 420]' onerror=this.src='no.png';></a><br><br>&quot;
document.write("<a href='link.php?bannerlink=3' target='_blank'><img src='http://www.clangatsu.com/foros/images/links/libre.jpg' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='www.phpbb.com - Official phpBB2 Site [Title: www.phpbb.com - Official phpBB2 Site | Visits: 137]' onerror=this.src='no.png';></a><br><br>&quot;
document.write("<a href='link.php?bannerlink=4' target='_blank'><img src='http://www.clangatsu.com/foros/images/links/gatsu-studios1.gif' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='phpbb-tw.net [Title: phpbb-tw.net | Visits: 167]' onerror=this.src='no.png';></a><br><br>&quot;
document.write("<a href='link.php?bannerlink=5' target='_blank'><img src='http://www.clangatsu.com/foros/images/links/logo_88x31.gif' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='Polish phpBB Support Site [Title: Polish phpBB Support Site | Visits: 133]' onerror=this.src='no.png';></a><br><br>&quot;
document.write("<a href='link.php?bannerlink=6' target='_blank'><img src='http://zona0.metropoliglobal.com/tops/button.gif' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='phpbb mods @ netclectic.com [Title: phpbb mods @ netclectic.com | Visits: 297]' onerror=this.src='no.png';></a><br><br>&quot;
document.write("<a href='link.php?bannerlink=7' target='_blank'><img src='http://www.nukemods.com/images/nukemods-88g_d.gif' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='Nukemods.com [Title: Nukemods.com | Visits: 223]' onerror=this.src='no.png';></a><br><br>&quot;
document.write("<a href='link.php?bannerlink=8' target='_blank'><img src='http://www.phpbb2.de/banner/bannerklein.gif' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='Banner4Free [Title: Banner4Free | Visits: 248]' onerror=this.src='no.png';></a><br><br>&quot;
document.write("<a href='link.php?bannerlink=9' target='_blank'><img src='http://www.clangatsu.com/foros/images/links/logo_88x31.gif' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='Arabian phpBB Support Site [Title: Arabian phpBB Support Site | Visits: 80]' onerror=this.src='no.png';></a><br><br>&quot;
document.write("<a href='link.php?bannerlink=10' target='_blank'><img src='http://www.phpbb2.de/banner/pixdesign_banner.gif' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='Pixdesign.ch [Title: Pixdesign.ch | Visits: 345]' onerror=this.src='no.png';></a><br><br>&quot;
document.write("<a href='link.php?bannerlink=11' target='_blank'><img src='http://www.phpbb2.de/banner/banner_db9.gif' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='Mods by Niels [Title: Mods by Niels | Visits: 305]' onerror=this.src='no.png';></a><br><br>&quot;
document.write("<a href='link.php?bannerlink=12' target='_blank'><img src='http://www.phpbb2.de/banner/vronline1.gif' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='VRonline the eXhibition [Title: VRonline the eXhibition | Visits: 166]' onerror=this.src='no.png';></a><br><br>&quot;
document.write("<a href='link.php?bannerlink=13' target='_blank'><img src='http://www.phpbb2.de/banner/smartorsite_logo.gif' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='Smartor Site [Title: Smartor Site | Visits: 173]' onerror=this.src='no.png';></a><br><br>&quot;
document.write("</div></marquee>&quot;
document.write("<div align='center'>&nbsp;</a>&nbsp;&nbsp;</div>&quot;

el que aparece es: http://www.clangatsu.com/gts_ban.php

vuelven a aparecer lo document.write y su codigo es este:

document.write("<marquee direction='up' height='50' align='center' scrollAmount='2' onmouseover='this.stop()' onmouseout='this.start()' name='scroll_minibanners' id='scroll_minibanners'><div align='center'>&quot;
document.write(" <a href='http://www.clangatsu.com/foros/links.php?action=go&link_id=11' target='_blank'><img src='http://www.clangatsu.com/foros/images/links/libre.jpg' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='[Titulo:FotoFokus.com|Visitas' onerror=this.src='/images/no.jpg';></a><br><br>&quot;
document.write("</div></marquee>&quot;
document.write("<div align='center'>&nbsp;</a>&nbsp;&nbsp;</div>&quot;


document.write("<marquee direction='up' height='50' align='center' scrollAmount='2' onmouseover='this.stop()' onmouseout='this.start()' name='scroll_minibanners' id='scroll_minibanners'><div align='center'>&quot;
document.write(" <a href='http://www.clangatsu.com/foros/links.php?action=go&link_id=7' target='_blank'><img src='http://www.clangatsu.com/foros/images/links/libre.jpg' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='[Titulo:Enlazate|Visitas' onerror=this.src='/images/no.jpg';></a><br><br>&quot;
document.write("</div></marquee>&quot;
document.write("<div align='center'>&nbsp;</a>&nbsp;&nbsp;</div>&quot;


document.write("<marquee direction='up' height='50' align='center' scrollAmount='2' onmouseover='this.stop()' onmouseout='this.start()' name='scroll_minibanners' id='scroll_minibanners'><div align='center'>&quot;
document.write(" <a href='http://www.clangatsu.com/foros/links.php?action=go&link_id=5' target='_blank'><img src='http://www.clangatsu.com/foros/images/links/bernardo.gif' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='[Titulo:Webernardo|Visitas' onerror=this.src='/images/no.jpg';></a><br><br>&quot;
document.write("</div></marquee>&quot;
document.write("<div align='center'>&nbsp;</a>&nbsp;&nbsp;</div>&quot;


document.write("<marquee direction='up' height='50' align='center' scrollAmount='2' onmouseover='this.stop()' onmouseout='this.start()' name='scroll_minibanners' id='scroll_minibanners'><div align='center'>&quot;
document.write(" <a href='http://www.clangatsu.com/foros/links.php?action=go&link_id=4' target='_blank'><img src='http://www.clangatsu.com/foros/images/links/libre.jpg' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='[Titulo:Enlazate|Visitas' onerror=this.src='/images/no.jpg';></a><br><br>&quot;
document.write("</div></marquee>&quot;
document.write("<div align='center'>&nbsp;</a>&nbsp;&nbsp;</div>&quot;


document.write("<marquee direction='up' height='50' align='center' scrollAmount='2' onmouseover='this.stop()' onmouseout='this.start()' name='scroll_minibanners' id='scroll_minibanners'><div align='center'>&quot;
document.write(" <a href='http://www.clangatsu.com/foros/links.php?action=go&link_id=3' target='_blank'><img src='http://www.clangatsu.com/foros/images/links/logo_88x31.gif' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='[Titulo:Clan Gatsu|Visitas' onerror=this.src='/images/no.jpg';></a><br><br>&quot;
document.write("</div></marquee>&quot;
document.write("<div align='center'>&nbsp;</a>&nbsp;&nbsp;</div>&quot;


document.write("<marquee direction='up' height='50' align='center' scrollAmount='2' onmouseover='this.stop()' onmouseout='this.start()' name='scroll_minibanners' id='scroll_minibanners'><div align='center'>&quot;
document.write(" <a href='http://www.clangatsu.com/foros/links.php?action=go&link_id=2' target='_blank'><img src='http://www.clangatsu.com/foros/images/links/gatsu-studios1.gif' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='[Titulo:Gatsu Studios|Visitas' onerror=this.src='/images/no.jpg';></a><br><br>&quot;
document.write("</div></marquee>&quot;
document.write("<div align='center'>&nbsp;</a>&nbsp;&nbsp;</div>&quot;


document.write("<marquee direction='up' height='50' align='center' scrollAmount='2' onmouseover='this.stop()' onmouseout='this.start()' name='scroll_minibanners' id='scroll_minibanners'><div align='center'>&quot;
document.write(" <a href='http://www.clangatsu.com/foros/links.php?action=go&link_id=1' target='_blank'><img src='http://www.clangatsu.com/foros/images/links/phpBB_88a.gif' border='0' style='filter: alpha(opacity=70)' onmouseover=this.style.filter='alpha(opacity=100)' onmouseout=this.style.filter='alpha(opacity=70)' alt='[Titulo:phpBB Official Website|Visitas' onerror=this.src='/images/no.jpg';></a><br><br>&quot;
document.write("</div></marquee>&quot;
document.write("<div align='center'>&nbsp;</a>&nbsp;&nbsp;</div>&quot;

comparándolos se observa que tu bucle for de php escribe muchos marquee cuando debería escribir uno solo; por lo tanto revisa ese bucle sacando la etiqueta marquee del bucle.

por otro lado, en el archivo horaact.js en la línea 36 hay un error que puso mi mozilla a echar humo, una especie de bucle infinito.

salu2, espero que te sirva.

Avatar Image
Usuario habitual
Usuario habitual

a ver... esque lo que tu no sabes es que las scripts se tienen que llamar desde otra pagina asi:
<script language="javascript" src="http://www.clangatsu.com/gts_ban.php"></script>

Entonces, que pasa¿? los textos sospechosos no se ven, y por lo tanto ese problema esta resuelto, por eso os he puesto esos dos enlaces.

Pero, como puedes observar, se repite el marquee direction up, y eso no quiero repetirlo, unicamente quiero repetir la parte que se encuentra en medio. y por eso no puedo, ya que si lo quito de en medio, se me descoloca y no va.

User 28318
User 28318
Machacateclados
Machacateclados

Bien, tienes que examinar el código de http://www.clangatsu.com/gts_ban.php seguro que hay un bucle tipo FOR y saca de el:

document.write("<marquee direction='up' height='50' align='center' scrollAmount='2' onmouseover='this.stop()' onmouseout='this.start()' name='scroll_minibanners' id='scroll_minibanners'>&quot [esto lo pones delante del for]

y

document.write("</marquee>&quot [esto lo pones después del for]

salu2

Avatar Image
Usuario habitual
Usuario habitual

Porfavor, si no te es mucha molestia, explicame mas detalladamente esto del for... porfavor. esque no me acabo de enterar mucho.

User 28318
User 28318
Machacateclados
Machacateclados

para poder ayudarte tienes que poner aquí el código del archivc
http://www.clangatsu.com/gts_ban.php

ok?

salu2

ATENCIÓN: Este tema no tiene actividad desde hace más de 6 MESES,
te recomendamos abrir un nuevo tema en lugar de responder al actual
Opciones:
Ir al subforo:
Permisos:
TU NO PUEDES Escribir nuevos temas
TU NO PUEDES Responder a los temas
TU NO PUEDES Editar tus propios mensajes
TU NO PUEDES Borrar tus propios mensajes
Temas similares
TemaUsuariosRespuestasVisitasActividad
Por: , el 21/Oct/2014, 15:40
ctxtech0964Oct/14
Por: , el 08/Jul/2009, 19:23
EffectedCard GestionXls lie-666154kJul/09
Por: , el 24/Jun/2008, 19:54
gjohnj Caos.X15kJun/08
Por: , el 06/Abr/2006, 11:18
Teclis425 sk.valshk14kApr/06
Por: , el 02/Ago/2005, 21:38
canarion7205kAug/05