Javascript Image Scroller Not Working With DOCTYPE
I've been searching the net hard for some javascript code that allows me to automatically scroll images non-stop horizontally on a webpage. After a long time searching, I finally c
Solution 1:
The probable reason is that you don't have quotes around the attributes in the last line of your code:
document.write('<a href = ' + pic[ii].link + 'target="_blank" ><img space=0 hspace=0 vspace=0 border=0 height=131 style=position:absolute;top:0;left:0' + myLeft[ii] + '; src=' + pic[ii].name + ' onMouseOver=stop() onMouseOut=go()></a>')
document.write('<a href="' + pic[ii].link + '" target="_blank"><img style="height:131px;position:absolute;top:0;left:' + myLeft[ii] + ';" src="' + pic[ii].name + '" onMouseOver="stop()" onMouseOut="go()" /></a>');
Also, I strongly advice you to add semicolons to your Javascript.
Lastly, use a library to do all of this and get more sleep.
Post a Comment for "Javascript Image Scroller Not Working With DOCTYPE"