I noticed when I did an alert on auto src it displays the full path. It only works with the full path I want to only have to test for "images/playBtn.png".
Another problem I have is in the else part the image changes like it should but the clearInterval(showOn); doesn't seem to do anything I thought it would pause the slideshow.
var ptImgObj=document.createElement('IMG');
var ImgObjExist=(ptImgObj!=null);
if(ImgObjExist)
{
var ptImg=document.body.appendChild(ptImgObj);
ImgObjExist=(ptImg!=null);
}
if(ImgObjExist)
{
ptImg.style.visibility='hidden';
ptImg.src="";
}
function getSRC(filename)
{
if(ImgObjExist)
{ptImg.src=filename;}
else{ptImg.src="";} // try - catch for error catch during set .src
return ptImg.src;
}
var auto1 = document.getElementById("button1");
auto1.src="images/pauseBtn1.png";
Bookmarks