Hi all.... The following Javascript does not seem to work using IE on a MAC. The images do not display. Seems to work OK using Safari and all browsers on a PC. The script creates a slideshow of images. Any suggestions? Much appreciated!.... <script type="text/javascript"><!-- function GotoPic(Num){ location.href=location.pathname+'?'+Num; } N=-1;Picture=new Array; N++;Picture[N]="imagename.jpg"; N++;Picture[N]="imagename2.jpg"; N++;Picture[N]="imagename3.jpg"; N++;Picture[N]="imagename4.jpg"; var ThisPic; var PrevPic; var NextPic; var ShowPrev; var ShowNext; if (location.search){ ThisPic=location.search.substring(1)*1; }else{ ThisPic=0; } NextPic=ThisPic+1;ShowNext=(NextPic>(Picture.length-1)?false:true); PrevPic=ThisPic-1;ShowPrev=(PrevPic<0?false:true); if (ShowPrev){ document.writeln('<a href="javascript:GotoPic(PrevPic)"><img src="navigation/previous.jpg" width="75" height="23" border="0"></a><img src="navigation/blank.jpg"> '); } if (ShowNext){ document.writeln('<a href="javascript:GotoPic(NextPic)"><img src="navigation/next.jpg" width="37" height="23" border="0"></a> '); } document.write('</P><img src="'+Picture[ThisPic]+'">'); // -</script>
Those HTML comments are incorrect and in any case not needed. Try removing them. This is unnecessarily complicated. Picture=["imagename.jpg","imagename2.jpg", ....];
Cant seem to find any alert using IE/MAC. I turned on the Script Error option but nothing comes up. Perhaps I am looking in the wrong place - will keep looking. A live version of the site can be found here (in case this helps): -edited- And here is a page (one of many) using the script itself: -edited-
This issue has now been resolved. Thank you for your help. http://forums.htmlcenter.com/showthread.php?p=9946