PDA

View Full Version : How to combine "Scrollable Menu Links" with "Image Thumbnail Viewer II"?



Immi
11-19-2007, 12:10 PM
1) Script Title: Scrollable Menu Links & Image Thumbnail Viewer II

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/scrollerlink.htm &
http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

3) Describe problem: Hi, I want to combine the scripts of Scrollable Menu Links & Image Thumbnail Viewer II because I have many pictures and not much space to show all the thumbnails at ones. I got problems with the mouseover of the viewer. The links work but they open in a new window instead of opening in the div box of "loadarea". Does anybody find a way to manage that? The link:
http://www.pleitegeier96.de/800x600/test.html

I didn't change a thing in the referring js-file so you can find it at:
http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

Thank you
Immi

jscheuer1
11-19-2007, 04:56 PM
Get rid of:


window.onload=fillup

from the scrollable links script. And get rid of the defer attribute (red) from the script tag for the viewer:


<script type="text/javascript" src="thumbnailviewer2.js" defer="defer">

/***********************************************
* Image Thumbnail Viewer II script- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

</script>

At the end of the viewer script change all this:


if (document.addEventListener) //Take advantage of "DOMContentLoaded" event in select Mozilla/ Opera browsers for faster init
thumbnailviewer2.addEvent(document, function(){thumbnailviewer2.alreadyrunflag=1; thumbnailviewer2.init()}, "DOMContentLoaded") //Initialize script on page load
else if (document.all && document.getElementsByTagName("a").length>0){ //Take advantage of "defer" attr inside SCRIPT tag in IE for instant init
thumbnailviewer2.alreadyrunflag=1
thumbnailviewer2.init()
}
thumbnailviewer2.addEvent(window, function(){if (!thumbnailviewer2.alreadyrunflag) thumbnailviewer2.init()}, "load") //Default init method: window.onload
thumbnailviewer2.addEvent(window, function(){thumbnailviewer2.cleanup()}, "unload")

to:


thumbnailviewer2.addEvent(window, function(){fillup();if (!thumbnailviewer2.alreadyrunflag) thumbnailviewer2.init()}, "load") //Default init method: window.onload
thumbnailviewer2.addEvent(window, function(){thumbnailviewer2.cleanup()}, "unload")

Immi
11-19-2007, 07:37 PM
Wow, it works really great! But I didn't expect anything else from you jscheuer1.
Thank you again.
Immi