javascript slide show not workin
-
i m displaying images from database in slide show but it is not displayed here is my code arr=new Array("/images/interswitch-logo.gif","/images/bbsalogo1.PNG","/images/smartphone.jpg","/images/searchicon.gif"); counter=0; arraylength=arr.length; function slide() { if(document.img.complete) { counter++; if(counter==arraylength) { counter=0; } document.img.src=arr[counter]; setTimeout("slide()",6*1000); } }
-
i m displaying images from database in slide show but it is not displayed here is my code arr=new Array("/images/interswitch-logo.gif","/images/bbsalogo1.PNG","/images/smartphone.jpg","/images/searchicon.gif"); counter=0; arraylength=arr.length; function slide() { if(document.img.complete) { counter++; if(counter==arraylength) { counter=0; } document.img.src=arr[counter]; setTimeout("slide()",6*1000); } }
the image should be exist in that appropriate location, i mean check the image path. add .. before the image path. For example "../images/smartphone.jpg"
thatraja