PDA

View Full Version : Image Thumbnail Viewer II And IE7 Problem



Jhcbiinoc
04-07-2007, 12:07 AM
1) Script Title:
Image Thumbnail Viewer II

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

3) Describe problem:

Everything is working great in Firefox and IE6.....however, there is an issue with IE7. The page loads and the images all appear, but the rollovers do not work. However, if you click any of the thumbnails, a new html page containing the full sized image which appears in the load area comes up; if you then go back to the page, the rollovers work. I need to get them to work as soon as it loads.

This is how it is setup in the head of the page:

<script type="text/javascript" src="/&#37;javasPath%/js/thumbnailviewer2.js" defer="defer">
/***********************************************
* Image Thumbnail Viewer II script- &#169; 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>
<script type="text/javascript">
var ImgArray = new Array('%imagePath%/nav_on_03.gif', '%imagePath%/nav_off_03.gif', '%imagePath%/nav_on_04.gif', '%imagePath%/nav_off_04.gif', '%imagePath%/nav_on_05.gif', '%imagePath%/nav_off_05.gif', '%imagePath%/nav_on_06.gif', '%imagePath%/nav_off_06.gif', '%imagePath%/nav_on_07.gif', '%imagePath%/nav_off_07.gif', '%imagePath%/alleight.gif', '%imagePath%/1kf_logo_sites.gif', '%imagePath%/1kf250_01.jpg', '%imagePath%/1kftn_01.jpg', '%imagePath%/1kf250_02.jpg', '%imagePath%/1kftn_02.jpg', '%imagePath%/1kf250_03.jpg', '%imagePath%/1kftn_03.jpg', '%imagePath%/1kf250_04.jpg', '%imagePath%/1kftn_04.jpg', '%imagePath%/1kf250_05.jpg', '%imagePath%/1kftn_05.jpg', '%imagePath%/panel_02.gif', '%imagePath%/panel_03.gif', '%imagePath%/panel_04.gif', '%imagePath%/thr_logo_sites.gif', '%imagePath%/thr250_01.jpg', '%imagePath%/thrtn_01.jpg', '%imagePath%/thr250_02.jpg', '%imagePath%/thrtn_02.jpg', '%imagePath%/thr250_03.jpg', '%imagePath%/thrtn_03.jpg', '%imagePath%/thr250_04.jpg', '%imagePath%/thrtn_04.jpg', '%imagePath%/thr250_05.jpg', '%imagePath%/thrtn_05.jpg', '%imagePath%/otb250_01.jpg', '%imagePath%/otb_logo_sites.gif', '%imagePath%/otb250_01.jpg', '%imagePath%/otbtn_01.jpg', '%imagePath%/otb250_02.jpg', '%imagePath%/otbtn_02.jpg', '%imagePath%/otb250_03.jpg', '%imagePath%/otbtn_03.jpg', '%imagePath%/otb250_04.jpg', '%imagePath%/otbtn_04.jpg', '%imagePath%/otb250_05.jpg', '%imagePath%/otbtn_05.jpg', '%imagePath%/lyt_logo_sites.gif', '%imagePath%/lyt250_01.jpg', '%imagePath%/lyttn_01.jpg', '%imagePath%/lyt250_02.jpg', '%imagePath%/lyttn_02.jpg', '%imagePath%/lyt250_03.jpg', '%imagePath%/lyttn_03.jpg', '%imagePath%/lyt250_04.jpg', '%imagePath%/lyttn_04.jpg', '%imagePath%/lyt250_05.jpg', '%imagePath%/lyttn_05.jpg', '%imagePath%/sll_logo_sites.gif', '%imagePath%/sll250_01.jpg', '%imagePath%/slltn_01.jpg', '%imagePath%/sll250_02.jpg', '%imagePath%/slltn_02.jpg', '%imagePath%/sll250_03.jpg', '%imagePath%/slltn_03.jpg', '%imagePath%/sll250_04.jpg', '%imagePath%/slltn_04.jpg', '%imagePath%/sll250_05.jpg', '%imagePath%/slltn_05.jpg', '%imagePath%/smc_logo_sites.gif', '%imagePath%/smc250_01.jpg', '%imagePath%/smctn_01.jpg', '%imagePath%/smc250_02.jpg', '%imagePath%/smctn_02.jpg', '%imagePath%/smc250_03.jpg', '%imagePath%/smctn_03.jpg', '%imagePath%/smc250_04.jpg', '%imagePath%/smctn_04.jpg', '%imagePath%/smc250_05.jpg', '%imagePath%/smctn_05.jpg', '%imagePath%/mma_logo_sites.gif', '%imagePath%/mma250_01.jpg', '%imagePath%/mmatn_01.jpg', '%imagePath%/mma250_02.jpg', '%imagePath%/mmatn_02.jpg', '%imagePath%/mma250_03.jpg', '%imagePath%/mmatn_03.jpg', '%imagePath%/mma250_04.jpg', '%imagePath%/mmatn_04.jpg', '%imagePath%/mma250_05.jpg', '%imagePath%/mmatn_05.jpg', '%imagePath%/stp_logo_sites.gif', '%imagePath%/stp250_01.jpg', '%imagePath%/stptn_01.jpg', '%imagePath%/stp250_02.jpg', '%imagePath%/stptn_02.jpg', '%imagePath%/stp250_03.jpg', '%imagePath%/stptn_03.jpg', '%imagePath%/stp250_04.jpg', '%imagePath%/stptn_04.jpg', '%imagePath%/stp250_05.jpg', '%imagePath%/stptn_05.jpg', '%imagePath%/mostrecent.gif', '%imagePath%/more_11.gif', '%imagePath%/Features.jpg', '%imagePath%/xptlogoss.gif', '%imagePath%/login.gif', '%imagePath%/signup.gif');
</script>
</head>

<body onload="MM_preloadImages(ImgArray);">

We are using a content management system which pulls <divs> into the layout and each div contains the code for the thumb gallery, eg;

<div class="picsrow">
<a href="%imagePath%/smc250_01.jpg" rel="enlargeimage::mouseover" rev="loadarea6"><img src="%imagePath%/smctn_01.jpg" width="88" height="88" class="sitepreviewtn75" /></a>
<a href="%imagePath%/smc250_02.jpg" rel="enlargeimage::mouseover" rev="loadarea6"><img src="%imagePath%/smctn_02.jpg" width="88" height="88" class="sitepreviewtn75" /></a>
<a href="%imagePath%/smc250_03.jpg" rel="enlargeimage::mouseover" rev="loadarea6"><img src="%imagePath%/smctn_03.jpg" width="88" height="88" class="sitepreviewtn75" /></a>
<a href="%imagePath%/smc250_04.jpg" rel="enlargeimage::mouseover" rev="loadarea6"><img src="%imagePath%/smctn_04.jpg" width="88" height="88" class="sitepreviewtn75" /></a>
<a href="%imagePath%/smc250_05.jpg" rel="enlargeimage::mouseover" rev="loadarea6"><img src="%imagePath%/smctn_05.jpg" width="88" height="88" class="sitepreviewtn75" /></a></div>
<div class="clear"></div>
</div>

These are dynamically drawn into the page where the thumbnailviewer2.js is called.

Anything I can do to get this to work correctly in IE7?

Thanks.

thetestingsite
04-07-2007, 02:16 AM
Can you post a link to your problem page so that we may review it to see if it is some kind of script conflict or whatnot.

Thanks.

EDIT: Also, when you view the demo (the link you posted above), does it work for you in IE7? If not, then we know that it is something to do with the script, and not just something on your page that is conflicting with it.

Jhcbiinoc
04-11-2007, 07:11 PM
Sorry for the delayed response on this.....as I suspected, it was not the script, there was some type of conflict with our CMS.

I found the answer in this thread:

http://www.dynamicdrive.com/forums/showthread.php?t=17344&highlight=Image+THumbnail+Viewer

Pasting the below code into the <head> of the page made it work in IE 6 and 7 and FF:

<!--[if IE]>
<script type="text/javascript">
if ( typeof window.attachEvent != "undefined")
window.attachEvent('onload' /%javasPath%/js/thumbnailviewer2.init);
</script>
<![endif]-->