simplex-media
Goto Top

Problem mit Slideshow Script

Hallo,
ich nutze folgendes Slideshow Script:
	
	var slideshow2_noFading = false;
	var slideshow2_timeBetweenSlides = 1500;
	var slideshow2_fadingSpeed = 20;
	
	var slideshow2_galleryHeigh;
	var slideshow2_galleryContainer;
	var slideshow2_galleryWidth;
	var slideshow2_slideIndex = -1;
	var slideshow2_slideIndexNext = false;
	var slideshow2_imageDivs = new Array();
	var slideshow2_currentOpacity = 100;
	var slideshow2_imagesInGallery = false;
	
	function getGalleryImageSize(imageIndex)
	{
		if(imageIndex==slideshow2_imagesInGallery){			
			showGallery();
		}else{
			var imgObj = document.getElementById('galleryImage' + imageIndex);  
			var imgWidth = imgObj.width;
			var imgHeight = imgObj.height;
			if(imgWidth>50){						
				var tmpDiv = document.createElement('DIV');  
				tmpDiv.id = 'galleryDiv' + imageIndex;  
				tmpDiv.style.visibility = 'hidden';  
				tmpDiv.className='imageInGallery';  
				slideshow2_galleryContainer.appendChild(tmpDiv);
				tmpDiv.appendChild(imgObj);
				imgObj.style.left = Math.round((slideshow2_galleryWidth - imgWidth)/2)  + "px";  
				imgObj.style.top = Math.round((slideshow2_galleryHeight - imgHeight)/2)  + "px";  
				tmpDiv.style.visibility = 'hidden';  
				slideshow2_imageDivs.push(tmpDiv);
				imageIndex++;
				getGalleryImageSize(imageIndex);
			}else{
				setTimeout('getGalleryImageSize(' + imageIndex + ')',10);  
			}
		}		
	}
	
	function showGallery()
	{
		if(slideshow2_slideIndex==-1)slideshow2_slideIndex=0; else slideshow2_slideIndex++;	
		if(slideshow2_slideIndex==slideshow2_imageDivs.length)slideshow2_slideIndex=0;
		slideshow2_slideIndexNext = slideshow2_slideIndex+1;	// Index of the next next image
		if(slideshow2_slideIndexNext==slideshow2_imageDivs.length)slideshow2_slideIndexNext = 0;
		
		slideshow2_currentOpacity=100;	// Reset current opacity

		slideshow2_imageDivs[slideshow2_slideIndex].style.visibility = 'visible';  
		if(navigator.userAgent.indexOf('Opera')<0){  
			slideshow2_imageDivs[slideshow2_slideIndexNext].style.visibility = 'visible';  
		}
		
		
		if(document.all){	// IE rules
			slideshow2_imageDivs[slideshow2_slideIndex].style.filter = 'alpha(opacity=100)';  
			slideshow2_imageDivs[slideshow2_slideIndexNext].style.filter = 'alpha(opacity=1)';  
		}else{
			slideshow2_imageDivs[slideshow2_slideIndex].style.opacity = 0.99;	// Can't use 1 and 0 because of screen flickering in FF 
			slideshow2_imageDivs[slideshow2_slideIndexNext].style.opacity = 0.01;
		}		
		

		setTimeout('revealImage()',slideshow2_timeBetweenSlides);		  
	}
	
	function revealImage()
	{
		if(slideshow2_noFading){
			slideshow2_imageDivs[slideshow2_slideIndex].style.visibility = 'hidden';  
			showGallery();
			return;
		}
		slideshow2_currentOpacity--;
		if(document.all){
			slideshow2_imageDivs[slideshow2_slideIndex].style.filter = 'alpha(opacity='+slideshow2_currentOpacity+')';  
			slideshow2_imageDivs[slideshow2_slideIndexNext].style.filter = 'alpha(opacity='+(100-slideshow2_currentOpacity)+')';  
		}else{
			slideshow2_imageDivs[slideshow2_slideIndex].style.opacity = Math.max(0.01,slideshow2_currentOpacity/100);
			slideshow2_imageDivs[slideshow2_slideIndexNext].style.opacity = Math.min(0.99,(1 - (slideshow2_currentOpacity/100)));
		}
		if(slideshow2_currentOpacity>0){
			setTimeout('revealImage()',slideshow2_fadingSpeed);  
		}else{
			slideshow2_imageDivs[slideshow2_slideIndex].style.visibility = 'hidden';			  
			showGallery();
		}
	}
	
	function initImageGallery()
	{
		slideshow2_galleryContainer = document.getElementById('imageSlideshowHolder');  
		slideshow2_galleryWidth = slideshow2_galleryContainer.clientWidth;
		slideshow2_galleryHeight = slideshow2_galleryContainer.clientHeight;
		galleryImgArray = slideshow2_galleryContainer.getElementsByTagName('IMG');  
		for(var no=0;no<galleryImgArray.length;no++){
			galleryImgArray[no].id = 'galleryImage' + no;  
		}
		slideshow2_imagesInGallery = galleryImgArray.length;
		getGalleryImageSize(0);		
		
	}



Die anzuzeigenden Bilder ermittle ich via PHP Script, mein problem ist nun das die galerie nur die Bilder anzeigt jedoch nicht den link in dem sie stehen

Beispiel:

<div id='imageSlideshowHolder'>  

<a href='bilder/1/big/1-1.jpg' rel='lightbox'><img src='bilder/1/thumb/1-1.jpg' /></a>  
<a href='bilder/1/big/1-10.jpg' rel='lightbox'><img src='bilder/1/thumb/1-10.jpg' /></a>  
<a href='bilder/1/big/1-11.jpg' rel='lightbox'><img src='bilder/1/thumb/1-11.jpg' /></a>  
<a href='bilder/1/big/1-12.jpg' rel='lightbox'><img src='bilder/1/thumb/1-12.jpg' /></a>  
<a href='bilder/1/big/1-13.jpg' rel='lightbox'><img src='bilder/1/thumb/1-13.jpg' /></a>  
<a href='bilder/1/big/1-14.jpg' rel='lightbox'><img src='bilder/1/thumb/1-14.jpg' /></a>  
<a href='bilder/1/big/1-15.jpg' rel='lightbox'><img src='bilder/1/thumb/1-15.jpg' /></a>  
</div>

Der Linkaufruf funktioniert in der Slideshow nicht, lediglich das Bild wird hier dagestellt.

Ich hoffe mir kann jemand sagen wie ich die Bilder in der Slideshow dazu bekomme das sie anklickbar werden.

Content-ID: 104751

Url: https://administrator.de/contentid/104751

Ausgedruckt am: 23.11.2024 um 01:11 Uhr