I have a photo album that cycles through a series of images when a user clicks on FORWARD or BACK, implemented by Javascript setting src img. It works correctly in FF, Opera, IE, and Safari, but not in Chrome — images and sometimes spaces sometimes appear in Chrome. If the images are cached, they are visible, but if they are not already loaded, Chrome does not load them. I confirmed that src is correctly set in the element, it just does not appear.
If the images are loaded in html for the page, they are displayed correctly when .src is installed in javascript, but if they are not in the loaded html code, some of them will be displayed and some will not - but only in Chrome, in all other browsers It works fine.
Is there any cache setting that I need to use for Chrome, or hack, what can I do to make sure they are loaded correctly?
Thanks to everyone.
Russell
(added) The following code. It is generated from where strange constants come from, and the file continues with a couple of hundred over <li> elements
<HTML> <HEAD> <link href="../lame.css" rel="stylesheet" type="text/css"> <TITLE>Young/Haraske slides</TITLE> <script src="../lame.js"></script> <script> var int2atts = [], int2path = [], paths = {}, atts; atts = {} int2atts[36] = atts; int2path[36] = "Families/Young/Russell" window.onload = function() {substituteNodeInfo(); showPage(254);} var imagePtr = 0; function nextImage(i) { imagePtr = (imagePtr + i + 254) % 254; var nextSrc = document.getElementById("photo" + imagePtr).src var mainImage = document.getElementById("MainImage"); var src = mainImage.src; mainImage.src = src.substring(0, src.lastIndexOf("/")) + nextSrc.substring(nextSrc.lastIndexOf("/")); return false; } </script> </HEAD> <BODY id="pathBody"> <H1 id="pageTitle">Russell</H1> <div> <img id="MainImage" src="../pictures/1845DEC61.JPG"></img> <h3 id="Title">Russell</h3> <div id="Text"></div> <a href="" onclick="return nextImage(-1)">Previous</a> <a href="" onclick="return nextImage(1)">Next</a> <p /> This filter is included in the following paths: <ul class="paths"> <li class="path"><a href="../folders/Russell.html?path=36">Families/Young/Russell</a></li> </ul> </div> <div class="choosePage"></div> <ul id="gallery" class="filteredItems"> <li id="listing0" class="lineblock"><p> <a class='folder' href="../items/1845DEC61.html"> <img id="photo0" src='../thumbnails/1845DEC61.JPG' alt='1845DEC61.JPG'> <br />Image page</a>/<a href="../fullsize/1845DEC61.JPG">Full size</a> <br />1845DEC61.JPG </li> <li id="listing1" class="lineblock"><p> <a class='folder' href="../items/1669.html"> <img id="photo1" src='../thumbnails/1669.JPG' alt='1669.JPG'> <br />Image page</a>/<a href="../fullsize/1669.JPG">Full size</a> <br />1669.JPG </li>
source share