Well obviously, not quite right. This could be a bit more complicated depending upon the other scripts/functions stored in your javascript.js file but, if none of them are in conflict with the fade-in slide show. This is how to do it -
If it isn't there already (as you haven't made that clear) this goes in the head of the page you want the slide show on:
Code:
<script language="Javascript" src="javascript.js"></script>
If the javascript.js file isn't in the same directory as this display page, there will be other problems but, from what you've said, it probably is there. In javascript.js remove the surrounding:
function slideshow() {
}
and, remove from the script, these lines:
Code:
if (ie4||dom)
document.write('<div style="position:relative;width:'+slideshow_width+';height:'+slideshow_height+';overflow:hidden"><div id="canvas0" style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:0;left:0;filter:alpha(opacity=10);-moz-opacity:10"></div><div id="canvas1" style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:0;left:0;filter:alpha(opacity=10);-moz-opacity:10;visibility: hidden"></div></div>')
else
document.write('<img name="defaultslide" src="'+fadeimages[0][0]+'">')
and place them, along with the credit (this credit part is to fulfill the Dynamic Drive usage terms) inside script tags in the body of your html file at the place where you want the slide show to appear. It will look like this:
HTML Code:
<script type="text/javascript">
/***********************************************
* Fade-in image slideshow script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
if (ie4||dom)
document.write('<div style="position:relative;width:'+slideshow_width+';height:'+slideshow_height+';overflow:hidden"><div id="canvas0" style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:0;left:0;filter:alpha(opacity=10);-moz-opacity:10"></div><div id="canvas1" style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:0;left:0;filter:alpha(opacity=10);-moz-opacity:10;visibility: hidden"></div></div>')
else
document.write('<img name="defaultslide" src="'+fadeimages[0][0]+'">')
</script>
Works here . . .
Bookmarks