Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/05/2012, 04:05
framos87
 
Fecha de Ingreso: mayo-2012
Mensajes: 6
Antigüedad: 12 años
Puntos: 0
scroll de thumbnails

Muy buenas gente,
esta es la primera vez que publico una duda de javascript en un foro puesto que acabo de empezar y hasta habia podido resolver todos mis problemas.
El caso es que estoy haciendo una pagina donde se muestra un treeview (este funciona perfectamente) y cuando pinchas en una carpeta se cargan dinamicamente las imagenes dentro del scroll de thumbnails situado algo mas abajo y que saque de esta pagina: http://manos.malihu.gr/jquery-thumbnail-scroller

El caso es que esas imagenes que previamente han sido cargadas con el SWFUpload no se me cargan correctamente, sin embargo si que me carga esas mismas imagenes antes de haber sido cargadas con el SWFUpload. En firefox no me las carga de ninguna de las dos maneras. no se si sera algun fallo en el script o el qué pero me estoy volviendo loco.
Si alguien me puede dar una pista le estare eternamente agradecido. aqui os dejo el codigo al completo porque como no se donde puede estar el fallo tengo miedo de poneros solo la parte del scroll y que el fallo este en otro sitio.

<html>
<head>
<title>visor Imagenes</title>
</head>
<script src="/Javascript/jquery-1.4.2.min.js" type="text/javascript"></script>
<script language="javascript">
</script>
<body>
<table cellpadding="0" cellspacing="0" width="100%" border="0">
<tr>
<td style="width: 100%" align="center">
<table cellpadding="0" cellspacing="0" width="1024px" border="0">
<tr>
<td>
<link href="/Javascript/scroller/jquery.thumbnailScroller.css" rel="stylesheet" />
<script src="/Javascript/scroller/jquery-ui-1.8.13.custom.min.js"></script>
<script src="/Javascript/scroller/jquery.thumbnailScroller.js"></script>
<script src="/Javascript/Treeview.js" type="text/javascript"></script>
<script language="javascript">
cNodos = new Coleccion();
cNodos.add(new Nodo('0','0','0','GeoGIS',-1,'','','',''));
cNodos.add(new Nodo('1','1','0','000001',1,'','','/VerImagenesServlet',''));
cNodos.add(new Nodo('2','2','0','000002',0,'','','/VerImagenesServlet',''));
cNodos.add(new Nodo('3','3','1','null',0,'','','/VerImagenesServlet',''));
cNodos.add(new Nodo('4','4','1','null',0,'','','/VerImagenesServlet',''));
cNodos.add(new Nodo('13','5','0','000013',0,'','','/VerImagenesServlet',''));
cNodos.add(new Nodo('14','6','0','000014',0,'','','/VerImagenesServlet',''));
cNodos.add(new Nodo('15','7','0','000015',0,'','','/VerImagenesServlet',''));
contenedor = document.getElementById('divTreeview');
window.onload = function () { ArbolNodosCrear(); };
jQuery.noConflict();
(function($){
window.onload=function(){
ArbolNodosCrear();
$("#tS2").thumbnailScroller({
scrollerType:"hoverPrecise",
scrollerOrientation:"horizontal",
scrollSpeed:2,
scrollEasing:"easeOutCirc",
scrollEasingAmount:600,
acceleration:4,
scrollSpeed:800,
noScrollCenterSpace:10,
autoScrolling:0,
autoScrollingSpeed:2000,
autoScrollingEasing:"easeInOutQuad",
autoScrollingDelay:500
});
}
})(jQuery);


function CargarFoto(a){
var img, div, oldImg, a2;
img = document.createElement("img");
a2 = document.createElement("a");
if (a.firstChild.name=="thumbnail"){
img.src = a.firstChild.src;
a2.href =a.firstChild.src;
}
else{
img.src = a.firstChild.nextSibling.src;
a2.href =a.firstChild.nextSibling.src;
}
img.width=300;
img.height=300;
div = document.getElementById('imgPreLoad');
oldImg = div.firstChild;
if (oldImg != null)
div.removeChild(oldImg);
a2.appendChild(img);
div.appendChild(a2);
}
</script>

<fieldset class="action" id="fsContenidos">
<table cellpadding="0" cellspacing="0" width="1024px" border="0">
<tr style="height: 350px;" valign="top">
<td style="width:874px;">
<form id="frmVerImagenes" name="frmVerImagenes" method="post">
<table class="cssTbContenidos" width="100%">
<tr valign="top">
<td id="clTreeview" width="40%">
<div id="divTreeview" name="divTreeview"></div>
</td>
<td width="60%">
<div id="imgPreLoad" align="center"> </div>
</td>
</tr>
<tr>
<td colspan="2">
<div id="tS2" class="jThumbnailScroller">
<div class="jTscrollerContainer">
<div class="jTscroller">
<a href="#" onclick="javascript:CargarFoto(this);"><img id="thumbnail" name="thumbnail" src="C:\1\prueba.jpg" width="100px" height="95px" /></a>
<a href="#" onclick="javascript:CargarFoto(this);"><img id="thumbnail" name="thumbnail" src="C:\1\prueba2.jpg" width="100px" height="95px" /></a>
<a href="#" onclick="javascript:CargarFoto(this);"><img id="thumbnail" name="thumbnail" src="C:\1\prueba3.jpg" width="100px" height="95px" /></a>
<a href="#" onclick="javascript:CargarFoto(this);"><img id="thumbnail" name="thumbnail" src="C:/1/prueba4.jpg" width="100px" height="95px" /></a>
<a href="#" onclick="javascript:CargarFoto(this);"><img id="thumbnail" name="thumbnail" src="C:/1/prueba2.jpg" width="100px" height="95px" /></a>
</div>
</div>
</div>
</td>
</tr>
</table>
</form>

</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>