Forum Moderators: open
I got this code that's supposed to work like a booklet- you add it to your favourites, and then when you're at a site with an open directory (like the ones that apache creates) and it's full of images, rather than click on each image to view, you can click on the link in your favourites and it will generate thumbnails of the images.
Know what I mean?
However I can't get the code to work at all in the bookmark form, I can't add it to favourites.
Here's the code:
var sHTML = '<html><head><title>Fotoviewer</title></head>\n<body>\n\t<div%20align="center">\n';for (x = 0; x < document.links.length; x++) {
link = document.links(x).href.toLowerCase();
if ((link.indexOf('.jpg')!= -1) ¦¦ (link.indexOf('.gif')!= -1) ¦¦ (link.indexOf('.png')!= -1) ¦¦ (link.indexOf('.bmp')!= -1)) {
sHTML += '\t\t<img%20src="'+document.links(x).href+'"/><br/><br/>\n'
}
}
sHTML += "\t</div>\n</body></html>";
document.body.innerHTML=sHTML;
If I cut and paste that into a .html file, and run it in explorer it doesn't work, and if I make a .js and link to it from an html file, it also doesn't work.
Anyone know what I'm doing wrong, or have a better solution?
Thanks!
I hope it should work now
Good lukc to you