PDA

View Full Version : Help with fade-in image slide show



Carmen
05-11-2005, 03:29 PM
Hi. I just had a quick question. When I pasted the onto my page, and the slide show begins, just as it starts there is an "x" box like an image is not showing up, but only for like 1 second. It never comes up after that. Can someone tell me how to remove that little x. All my images do appear, but for like 1 second the x appears quickly and then disappears. this happens everytime i load the page. thanks in advance.

karine
05-11-2005, 03:58 PM
X box means that your first image isn't loading. check the path of that one image. or remove it as a test to see if the X box doesn't reappear.

Karine

Carmen
05-11-2005, 04:04 PM
thanks, but every one of my pics are loading, i only have 3. the x only shows up for like a sec and then leaves.

Carmen
05-11-2005, 04:34 PM
here is the javascript:

<script language="JavaScript1.1">
<!--
//preload images
var image1=new Image()
image1.src="http://printstyleonline.com/image1ps.JPG"
var image2=new Image()
image2.src="http://printstyleonline.com/image2ps.JPG"
var image3=new Image()
image3.src="http://printstyleonline.com/image4ps.JPG"
//-->
</script>
</head>
<body onLoad="slideit()">
<a href="http://printstyleonline.com/originalindex.html"><img src="firstimage.gif" name="slide" border=0 style="filter:blendTrans(duration=3)"></a>
<script>
<!--
var step=1
var whichimage=1
function slideit(){
if (!document.images)
return
//If the browser is IE 4.x
if (document.all)
slide.filters.blendTrans.apply()
document.images.slide.src=eval("image"+step+".src")
//If the browser is IE 4.x
if (document.all)
slide.filters.blendTrans.play()
whichimage=step
if (step<3)
step++
else
step=1
setTimeout("slideit()",4000)
}
function slidelink(){
if (whichimage==1)
window.location="link1.htm"
else if (whichimage==2)
window.location="link2.htm"
else if (whichimage==3)
window.location="link3.htm"
}
//-->
</script>
</body>
</html>

jscheuer1
05-11-2005, 06:56 PM
That doesn't look like the Dynamic Drive Fade-in Image slideshow found at:

http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

Perhaps you would have better luck with that one. An added benefit to using the above mentioned script is that its fade-in effect will work in browsers other than IE. The key to avoiding an 'x' (it is really the 'broken image link symbol' and varies from browser to browser) is to have your images preloaded before the browser tries to display them and to have something to show folks while this is happening. I see the script you are using has a preload function but, it is a primitive one with no checking to see if preloading is complete before doing anything else. But, much more important, the image it shows folks while waiting (shown in red from a part of your code):


<a href="http://printstyleonline.com/originalindex.html"><img src="firstimage.gif" name="slide" border=0 style="filter:blendTrans(duration=3)"></a>isn't there, change it to:


<a href="http://printstyleonline.com/originalindex.html"><img src="image1ps.JPG" name="slide" border=0 style="filter:blendTrans(duration=3)"></a>and it should avoid the broken image symbol but, the first image will no longer appear to fade-in from nowhere. If you were to use a transparent .gif and name it firstimage.gif and upload it to:

http://printstyleonline.com/

then you wouldn't need to change the code at all and things should work fine.

tattitude
09-08-2005, 12:55 AM
Fade-in slideshow works fine in preview and preview in browser but when i published to my server it did not show up just a box with an x. I also noticed a lot of other parts of my site are not right. the example can be found at http://www.tattitudetattoos.com thanks for the help

jscheuer1
09-08-2005, 04:28 AM
You have to upload the image files to the server and they have to have the exact same upper/lower case, spelling and the exact location as specified in the code.