2 Divs in thumbnail Viewer II called by the same thumbnail.
2 posts by 2 authors in: Forums > CMS Builder
Last Post: April 6, 2010 (RSS)
By gkornbluth - April 2, 2010
Hi all,
I'm using thumbnail Viewer II http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm to display some images and I've come against a bit of a snag.
I'd like to create 2 loadarea Divs in separate locations on a web page but I need them to be called from the same set of thumbnails.
One Div would be used to display the enlarged image on rollover and the other Div would display "title" information for the same rolled over thumbnail.
I know how to set up the "title" information in a Div but can't seem to get the 2 Divs to work at the same time.
Thought someone might have done this type of thing before.
Thanks,
Jerry Kornbluth
I'm using thumbnail Viewer II http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm to display some images and I've come against a bit of a snag.
I'd like to create 2 loadarea Divs in separate locations on a web page but I need them to be called from the same set of thumbnails.
One Div would be used to display the enlarged image on rollover and the other Div would display "title" information for the same rolled over thumbnail.
I know how to set up the "title" information in a Div but can't seem to get the 2 Divs to work at the same time.
Thought someone might have done this type of thing before.
Thanks,
Jerry Kornbluth
The first CMS Builder reference book is now available on-line!
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Re: [gkornbluth] 2 Divs in thumbnail Viewer II called by the same thumbnail.
By Jason - April 6, 2010
Hi Jerry,
I think I got it figured out. You'll need to make some changes to the thumbnailviewer2.js file. Here are the changes:
1)right under the line "var showcontainer=document.getElementById(linkobj.getAttribute("rev").split("::")[0]) " (should be around line 21) put in this line:
var showcontainer2=document.getElementById("loadarea2");
This assumes that the second div on your page is called "loadarea2).
2) Next, remove these 2 lines (should be around lines 28,29)
if (description!="") //Use title attr of the link as description?
imageHTML+='<br />'+description
3)finally, under the line "showcontainer.innerHTML=imageHTML" (around line 33)
add this:
showcontainer2.innerHTML=description;
This will take the "title" attribute of the image and put it in the div called "loadarea2".
Give that a try.
Hope it helps.
I think I got it figured out. You'll need to make some changes to the thumbnailviewer2.js file. Here are the changes:
1)right under the line "var showcontainer=document.getElementById(linkobj.getAttribute("rev").split("::")[0]) " (should be around line 21) put in this line:
var showcontainer2=document.getElementById("loadarea2");
This assumes that the second div on your page is called "loadarea2).
2) Next, remove these 2 lines (should be around lines 28,29)
if (description!="") //Use title attr of the link as description?
imageHTML+='<br />'+description
3)finally, under the line "showcontainer.innerHTML=imageHTML" (around line 33)
add this:
showcontainer2.innerHTML=description;
This will take the "title" attribute of the image and put it in the div called "loadarea2".
Give that a try.
Hope it helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/