Bienvenido(a), Visitante. Por favor, ingresa o regístrate.

Ingresar con nombre de usuario, contraseña y duración de la sesión

 
Búsqueda Avanzada

15.707 Mensajes en 3.130 Temas- por 371 Usuarios - Último usuario: lasfirrot
Mayo 18, 2012, 04:26:31
Foro de Hispabyte.netDiseño WebHosting y Desarrollo WebASP (Moderador: D4MR0D)Tema: Fallo de visualizaci?n de gifs
Páginas: [1]   Ir Abajo
Imprimir
Autor Tema: Fallo de visualizaci?n de gifs  (Leído 1226 veces)
0 Usuarios y 1 Visitante están viendo este tema.
BLACK-SCORPION
Visitante
« : Julio 22, 2004, 02:21:23 »


Saludos a todos.

Este es mi primer mensaje en este foro de Hispabyte,aunque os visito desde poco antes del cierre de prehackers.

Estoy haciendo mi 1? p?g. web,la cual podeis visitar en http://www.iespana.es/La-Web-De-Max/index.html (por ahora en desarrollo) y me ha surgido un problema al colocar un archivo javascript.

El archivo funciona correctamente y hace lo que deberia pero ha generado un efecto secundario en la p?g.
Las im?genes animadas que est?n en formato gif se congelan en un fotograma aleatorio en el momento de
la ejecuci?n de la funci?n [ openandclose(visi) ] sobre cualquiera de sus elementos.

He de resaltar que este script ha sido tomado de internet y que simplemente lo he adaptado para que acepte
los estilos que he incluido en la p?g.

Tambi?n he estado comprobando los nombres de funciones y variables por si se repetian en otros scripts, aunque pudiera haber alguna parte en ellas que fueran similares pero desconozco cual es la forma de modificarlas.

Os agradeceria pudieras clarificarme el modo de solucionar este problema ya que sino deberia optar por
colocar im?genes fijas o buscar otro script que se adaptase mejor a la p?gina.

A?n asi me gustaria conocer la soluci?n ha este problema que sospecho tiene que ver con la carga de im?genes o del documento web.

Espero pueda seros de ayuda en el futuro aportando soluciones a vuestros problemas.

Adjunto copia del archivo javascript.

Código:
// EL SCRIPT EST? EN ARCHIVO .JS Y EN EL BODY EST? LA LLAMADA A LA FUNCI?N PRINCIPAL
// [ <bodyonLoad="openandclose(1000)"> ]
// ***********************************************************************************
var menublock=new Array()
var plus_i=0

menublock[0]="Inform?tica|#|;"+? ? ? ? ? ?? // text|URL|target of mainlink
? ? "Portales de inform?tica|submenu11.html|_top;"+? // text|URL|target of first sublink
? ? "Revistas de inform?tica|submenu12.html|main;"?? // text|URL|target of second sublink?
? ?
menublock[1]="Ente?genos|#|;"+? ? ? ? ? ? ? ? ? ?? // text and URL of first mainlink
? ? "Recursos generales|submenu21.html|main;"+ // text|URL|target of mainlink
? ? "Gr?ficos|submenu22.html|main;"+ // text|URL|target of first sublink
? ? "Iconos|submenu23.html|main;"+ // text|URL|target of second sublink
? ? "Im?genes|submenu24.html|main;"+ // text|URL|target of thirth sublink
? ? "Salvapantallas|submenu25.html|main;"? ?? // text|URL|target of fourth sublink
? ? ? ??

menublock[2]="Glosario de t?rminos|#|;"+? ? ? ? ? ? ? ? ? ?? // text and URL of mainlink
? ? "Hardware recursos|submenu31.html|main;"+ // text and URL of first sublink
? ? "Pc Consultas|submenu32.html|main;"+ // text and URL of second sublink
? ? "Drivers|submenu33.html|main;"+? ? ?? // text and URL of thirth sublink?
? ? "Dlls|submenu34.html|main;"+? ? ?? // text and URL of thirth sublink?
? ? "Empresas|submenu35.html|main;"?? // text and URL of thirth sublink
? ?
?
menublock[3]="Downloads|#|;"+? ? ? ? ? ? ? ? ? ?? // text and URL of mainlink
? ? "Trucos Office|submenu41.html|main;"+ // text and URL of first sublink
? ? "Trucos Windows|submenu42.html|main;"+ // text and URL of second sublink
? ? "Access|submenu43.html|main;"+? ? ?? // text and URL of thirth sublink?
? ? "Excel|submenu44.html|main;"+? ? ?? // text and URL of thirth sublink?
? ? "Unix - Linux|submenu45.html|main;"?? // text and URL of thirth sublink



menublock[4]="Links|#|;"+? ? ? ? ? ? ? ? ? ?? // text and URL of mainlink
? ? "Recursos Generales|submenu51.html|main;"+ // text and URL of first sublink
? ? "Visual Basic|submenu52.html|main;"+ // text and URL of second sublink
? ? "C++|submenu53.html|main;"+? ? ?? // text and URL of thirth sublink?
? ? "Delphi|submenu54.html|main;"+? ? ?? // text and URL of thirth sublink?
? ? "Javascript|submenu55.html|main;"+?? // text and URL of thirth sublink
? ? ? ? ? ?? "ASP|submenu56.html|main;"?? // text and URL of thirth sublink
? ? ? ? ? ? ? ?

menublock[5]="Games|#|;"+? ? ? ? ? ? ? ? ? ?? // text and URL of mainlink
? ? "Recursos Generales|submenu61.html|main;"+ // text and URL of first sublink
? ? "Portales Hacker|submenu62.html|main;"+ // text and URL of second sublink
? ? "Cracks|submenu63.html|main;"+? ? ?? // text and URL of thirth sublink?
? ? "Descargas|submenu64.html|main;"+? ? ?? // text and URL of thirth sublink?
? ? "Juegos|submenu66.html|main;"+?? // text and URL of thirth sublink
? ? ? ? ? ?? "DVD-CDR|submenu66.html|main;"?? // text and URL of thirth sublink

menublock[6]="Varios|#|;"+? ? ? ? ? ? ? ? ? ?? // text and URL of mainlink
? ? "Recursos Generales|submenu61.html|main;"+ // text and URL of first sublink
? ? "Portales Hacker|submenu62.html|main;"+ // text and URL of second sublink
? ? "Cracks|submenu63.html|main;"+? ? ?? // text and URL of thirth sublink?
? ? "Descargas|submenu64.html|main;"+? ? ?? // text and URL of thirth sublink?
? ? "Juegos|submenu66.html|main;"+?? // text and URL of thirth sublink
? ? ? ? ? ?? "DVD-CDR|submenu66.html|main;"?? // text and URL of thirth sublink

menublock[7]="Evoluci?n del site|#|;"+? ? ? ? ? ? ? ? ? ?? // text and URL of mainlink
? ? "Recursos Generales|submenu61.html|main;"+ // text and URL of first sublink
? ? "Portales Hacker|submenu62.html|main;"+ // text and URL of second sublink
? ? "Cracks|submenu63.html|main;"+? ? ?? // text and URL of thirth sublink?
? ? "Descargas|submenu64.html|main;"+? ? ?? // text and URL of thirth sublink?
? ? "Juegos|submenu66.html|main;"+?? // text and URL of thirth sublink
? ? ? ? ? ?? "DVD-CDR|submenu66.html|main;"?? // text and URL of thirth sublink
? ? ? ? ? ? ? ? ? ? ? ? ? ??
// No need to change anything below?
//? **********************************************************************************
?
var menusplit
var urlsplit

var minusimg=new Image()
minusimg.src="_private/COMP-WEB/BOTONES/carp-abierta.gif"

var plusimg=new Image()
plusimg.src="_private/COMP-WEB/BOTONES/carp-cerrada.gif"
? ?
var showsubmenus=new Array()
for (i=0;i<=menublock.length-1;i++) {
showsubmenus[i]=-1
}

var plusminusimg=new Array()
for (i=0;i<=menublock.length-1;i++) {
plusminusimg[i]=plusimg.src
}

function openandclose(visi) {
showsubmenus[visi]=(-1)*showsubmenus[visi]
? ? var menucontent=""
? ? if (showsubmenus[visi]==1) {plusminusimg[visi]=minusimg.src}
? ? if (showsubmenus[visi]==-1) {plusminusimg[visi]=plusimg.src}
? ? menucontent+="<table>"
for (i=0;i<=menublock.length-1;i++) {
? menusplit=menublock[i].split(";")
? urlsplit=menusplit[0].split("|")
? menucontent+="<tr><td>"

? ? ? ?

? ? ?? if (menusplit[1].length==0) {
? ? ? ? ? ? menucontent+="</td>"
? ? ? ? ? ? menucontent+="<td>"
? ? ? ? ? ? menucontent+="<a href="+urlsplit[1]+" target="+urlsplit[2]+">"
? ? ? ? ? ? menucontent+=urlsplit[0]
? ? ? ? ? ? menucontent+="</a></td></tr>"
? ? ? ? ? ? plus_i++
? ? ? ? }
? ? ? ?
? ? ? ? if (menusplit[1].length!=0) {
? ? ? ? ? ? var thismainmenu=i+plus_i
? ? ? ? ? ? menucontent+="<a href='javascript:openandclose("+i+")'>"
? ? ? ? ? ? menucontent+="<img src='"+plusminusimg[i]+"' border=0></a></td>"
? ? ? ? ? ? menucontent+="<td>"
? ? ? ? ? ? menucontent+="<a href='javascript:openandclose("+i+")'>"
? ? ? ? ? ? menucontent+=urlsplit[0]
? ? ? ? ? ? menucontent+="</a></td></tr>"
??
? ? ? if (showsubmenus[i]==1) {
? ? ?? for (ii=1;ii<=menusplit.length-1;ii++) {
? ? ? ? urlsplit=menusplit[ii].split("|")
? ? ? ? ? ? ? ? ? ? menucontent+="<tr><td></td><td>"
? ? ? ? ? ? ? ? ? ? menucontent+="<a href="+urlsplit[1]+" target="+urlsplit[2]+">"
? ? ? ? ? ? ? ? ? ? menucontent+=urlsplit[0]
? ? ? ? ? ? ? ? ? ? menucontent+="</a></td></tr>"
? ? ?? }
? ? ? }
? ? ? ? }? ?
}
? ? menucontent+="</table>"
if (document.all) {
? menu.innerHTML=menucontent
}
if (document.layers) {
? document.menu.document.write(menucontent)
? document.menu.document.close()
}
}

« Última modificación: Agosto 12, 2004, 03:01:58 por BLACK-SCORPION » En línea
LocK_CDA
Miembro Imprescindible
*****
Mensajes: 574


Ver Perfil
« Respuesta #1 : Julio 22, 2004, 02:33:57 »

Si, a mi tambi?n me pasaba eso... no se si tiene soluci?n o no, aunque lo dudo. La soluci?n podr?a ser cambiar los gifs por un flash.... no se si haciendo un include se solucionar?a pero int?ntalo. Escrive el script en un archivo a parte y a??delo mediante un include y a ver que pasa... seguramente no funcionar? pero tienes que jugar con estas cosas. Tambi?n puedes probar con frames (si pones los links que usan el script en un frame entonces los gifs que est?n en otro frame no sufrir?n los cambios).

Ve jugando con estas cosas. A ver si alguien sabe la respuesta para que eso deje de pasar pero yo en su momento no lo supe solucionar Lengua.
« Última modificación: Julio 22, 2004, 02:35:08 por LocK_CDA » En línea
BLACK-SCORPION
Visitante
« Respuesta #2 : Julio 22, 2004, 03:36:58 »

Saludos LocK_CDA.

Gracias por tomarte tu tiempo en leer el mensaje y buscar una soluci?n.

Mis conocimientos en javascript son todavia escasos.Ya buscar? el metodo del include aunque supongo que
ser? algo como :
Código:
<include><script src="_private/COMP-WEB/JAVASCRIPTS/secciones.js"></script></include>
El archivo lo tengo a?adido simplemente en el head como:
Código:
<script src="_private/COMP-WEB/JAVASCRIPTS/secciones.js"></script>
En relaci?n a:

Citar
Tambi?n puedes probar con frames (si pones los links que usan el script en un frame entonces los gifs que est?n en otro frame no sufrir?n los cambios).

Precisamente queria evitar el uso de frames en la p?g.De todas formas los gifs animados que estaban en el iframe que contiene las noticias,novedades y opciones se veian igualmente afectados.

Tratar? de hacer las animaciones en flash como me has dicho ya que he comprobado que el que tengo puesto
funciona correctamente.

Con todo si alguien conoce la forma de solucionarlo con los gifs le estaria agradecido si lo comenta en el
foro a fin de que aprendieramos algo m?s todos con su aportaci?n.
En línea
LocK_CDA
Miembro Imprescindible
*****
Mensajes: 574


Ver Perfil
« Respuesta #3 : Julio 22, 2004, 08:04:46 »

Un include es una funci?n de PHP que lo que hace es a?adir un c?digo a otra p?gina php. Ser?a algo como lo siguiente...
<?
include('pagina.php'):
?>

Pero dudo que funcione puesto que lo que haces es a?adir el c?digo encima de una parte del documento... es decir si la pagina le pones
<table><tr><td>hola</td></tr></table

y le haces 1 include al index k contiene:
<? include('pagina.php'); ?>
bla bla bla

Te quedar?a esto

<table><tr><td>hola</td></tr></table
bla bla bla

Espero hablerme explicado bien... pero repito que no creo que funcione, pero por probar... xP
En línea
BLACK-SCORPION
Visitante
« Respuesta #4 : Agosto 12, 2004, 04:07:43 »

Saludos a todos los miembros del foro.

He estado un tanto liado estos d?as por lo que no pude pasarme antes por aqui.

LocK_CDA dijo:
Citar
Si, a mi tambi?n me pasaba eso... no se si tiene soluci?n o no, aunque lo dudo.
Al final no he tenido que cambiar las animaciones a flash ni meterme con PHP (no lo prob? porque todavia no queria empezar con PHP).

Simplemente he aprovechado un alojamiento que ten?a en iespana para colgarla y funciona todo correctamente.

Este cambio de alojamiento lo he realizado debido a las ultimas modificaciones de miarroba.

En estos momentos podeis observar la misma web alojada en ambos sitios aunque el javascript del menu de secciones ya no se visualiza debido a la nueva publicidad de miarroba(como parece que todavia no es definitiva igual puede volver a visualizarse).

http://www.iespana.es/La-Web-De-Max/index.html
http://la-web-de-max.webcindario.com/

Nota: debido a la detecci?n de resoluci?n por el momento solo se visualiza con resoluci?n 1024 x 768.

El problema parece ser de algun tipo de script que a?adan (o no) en las p?ginas los servidores.

No estoy totalmente seguro ya que abriendo la p?g en mi ordenador no funciona bien,viendola servida desde miarroba tampoco pero desde iespana va correcto.

Por todo esto y debido a mis escasos conocimientos sobre el tema esto es lo que puedo deducir :

Si se tiene un problema con alg?n elemento del web probar a solucionarlo localmente pero si sigue sin corregirse sospechar de alguna incompatibilidad con el servidor ( no es mi intenci?n adjudicar la culpa a otros de un error que puede ser nuestro ).

De cualquier modo gracias por las sugerencias planteadas LocK_CDA;cuando termine con est? web ya entrar? con lo de PHP para aprender y ponerlo en pr?ctica.

Espero os sirva de algo este post.

Hasta el siguiente,saludos.
En línea
LocK_CDA
Miembro Imprescindible
*****
Mensajes: 574


Ver Perfil
« Respuesta #5 : Agosto 14, 2004, 04:02:07 »

Entonces es claramente culpa del servidor mi@.

Saludos!
En línea
Páginas: [1]   Ir Arriba
Imprimir
Foro de Hispabyte.netDiseño WebHosting y Desarrollo WebASP (Moderador: D4MR0D)Tema: Fallo de visualizaci?n de gifs
Ir a:  


Tema diseñado por RJ-45 para Hispabyte.net basado en el
theme famouspadexx v.09 designed by Formado Comprido
Downloable here. My present to padexx.de