1) Script Title: Lightbox 2 / thumbnail viewer 2
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...thumbnail2.htm & http://www.dynamicdrive.com/dynamici...box2/index.htm
3) Describe problem: Hi all... Am new to the Forum but I can see I'll be on it a bit from now on. Firstly I'm a graphic designer and not much of a coder to be honest and I'm having a bit of a problem getting multiple scripts to function at the same time
I'm using dreamweaver to build a site which uses the thumbnail viewer script and lightbox 2 at the same time (as well as rollover image script generated by DW) - I'm not trying to combine the scripts, just to use them independently on the same page, doing their normal jobs
Basically I can get them all to work independently but when all three scripts are used together I can either get the lightbox and rollovers to work or the thumbnail viewer and rollovers to work but not all three at once
I've been reading up and it looks like it could be an "onload" problem but I'm just not familiar with the syntax and really need someones help. At present, only the rollover images are preloaded by the looks of it
Many thanks in advance
James
If it's of any use, here's the script text from the head section - External files are all in the right place as all scripts work independently
**************************************
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="thumbnailviewer2.js">
/***********************************************
* 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>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript">
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
</script>



Reply With Quote

Bookmarks