Slideshow mit PopUp Funktion

  • #1
C

Ciryx

Bekanntes Mitglied
Themenersteller
Dabei seit
07.01.2004
Beiträge
135
Reaktionspunkte
0
Ort
Zürich
Morgen zusammen...

Ich habe eine wunderbare slideshow (slideshow.php), welche mir drei Bilder abwechslungsweise anzeigt. Klickt man auf das gerade angezeigte Bild, öffnet sich ein neues Fenster und das Bild wird gross dargestellt. Nun möchte ich aber, dass sich nich ein ganzes Fenster öffnet sonder lediglich ein PopUp. Kann mir da jemand von Euch weiterhelfen?

Link ==>

slideshow.php
Code:
<script type=text/javascript>

var ultimateshow=new Array()

ultimateshow[0]=['pic1.gif',->[url]http://www.ciryx.ch/slideshow/pic1.gif'[/url],->_new']
ultimateshow[1]=['pic2.gif',->[url]http://www.ciryx.ch/slideshow/pic2.gif'[/url],->_new']
ultimateshow[2]=['pic3.gif',->[url]http://www.ciryx.ch/slideshow/pic3.gif'[/url],->_new']

//configure the below 3 variables to set the dimension/background color of the slideshow

var slidewidth=155px //set to width of LARGEST image in your slideshow
var slideheight=222px //set to height of LARGEST iamge in your slideshow
var slidecycles=continous //number of cycles before slideshow stops (ie: 2 or continous)
var randomorder=no //randomize the order in which images are displayed? yes or no
var preloadimages=yes //preload images? yes or no
var slidebgcolor='#000000'
//var slidebgcolor='white'

//configure the below variable to determine the delay between image rotations (in miliseconds)
var slidedelay=3000

////Do not edit pass this line////////////////

var ie=document.all
var dom=document.getElementById
var curcycle=0

if (preloadimages==yes){
for (i=0;i<ultimateshow.length;i++){
var cacheimage=new Image()
cacheimage.src=ultimateshow[i][0]
}
}

var currentslide=0

function randomize(targetarray){
ultimateshowCopy=new Array()
var the_one
var z=0
while (z<targetarray.length){
the_one=Math.floor(Math.random()*targetarray.length)
if (targetarray[the_one]!=_selected!){
ultimateshowCopy[z]=targetarray[the_one]
targetarray[the_one]=_selected!
z++
}
}
}

if (randomorder==yes)
randomize(ultimateshow)
else
ultimateshowCopy=ultimateshow

function rotateimages(){
curcycle=(currentslide==0)? curcycle+1 : curcycle
ultcontainer='<center>'
if (ultimateshowCopy[currentslide][1]!=)
ultcontainer+='<a href='+ultimateshowCopy[currentslide][1]+' target='+ultimateshowCopy[currentslide][2]+'>'
ultcontainer+='<img src='+ultimateshowCopy[currentslide][0]+' border=0 width=155px height=222px>'
if (ultimateshowCopy[currentslide][1]!=)
ultcontainer+='</a>'
ultcontainer+='</center>'
if (ie||dom)
crossrotateobj.innerHTML=ultcontainer
if (currentslide==ultimateshow.length-1) currentslide=0
else currentslide++
if (curcycle==parseInt(slidecycles) && currentslide==0)
return
setTimeout(rotateimages(),slidedelay)
}

if (ie||dom)
document.write('<div id=slidedom style=width:'+slidewidth+';height:'+slideheight+'; background-color:'+slidebgcolor+'></div>')

function start_slider(){
crossrotateobj=dom? document.getElementById(slidedom) : document.all.slidedom
rotateimages()
}

if (ie||dom)
window.onload=start_slider

</script>
 
  • #2
Mittlerweile hab ich es mit Hilfe eines Kollegen gelöst!

slideshow.php
Code:
<?php
if(isset($_GET['pic'])) {
?>
<html>
 <head>
  <title> </title>
  <style>
  body {
    background-color:#000000;
    margin:0px;
    padding:0px;
  }
  </style>
 </head>
 <body>
<? echo <a href='javascript:window.close()'><img src='.$_GET['pic'].' border='0' /></a>\n; ?>
 </body>
</html>

<?
} else {
?>

<html>
<head>
<SCRIPT LANGUAGE=JavaScript>

function popup(u)
   {
    var props  = location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no,status=0,left=0,top=0,width=360,height=511; 
    window.open(u,'pop',props).focus();
   }

</script> 
<script type=text/javascript>

var ultimateshow=new Array()

ultimateshow[0]=['pic1.gif',->pic1.gif',->_new']
ultimateshow[1]=['pic2.gif',->pic2.gif',->_new']
ultimateshow[2]=['pic3.gif',->pic3.gif',->_new']

//configure the below 3 variables to set the dimension/background color of the slideshow

var slidewidth=155px //set to width of LARGEST image in your slideshow
var slideheight=222px //set to height of LARGEST iamge in your slideshow
var slidecycles=continous //number of cycles before slideshow stops (ie: 2 or continous)
var randomorder=no //randomize the order in which images are displayed? yes or no
var preloadimages=yes //preload images? yes or no
var slidebgcolor='#000000'
//var slidebgcolor='white'

//configure the below variable to determine the delay between image rotations (in miliseconds)
var slidedelay=4000

////Do not edit pass this line////////////////

var ie=document.all
var dom=document.getElementById
var curcycle=0

if (preloadimages==yes){
for (i=0;i<ultimateshow.length;i++){
var cacheimage=new Image()
cacheimage.src=ultimateshow[i][0]
}
}

var currentslide=0

function randomize(targetarray){
ultimateshowCopy=new Array()
var the_one
var z=0
while (z<targetarray.length){
the_one=Math.floor(Math.random()*targetarray.length)
if (targetarray[the_one]!=_selected!){
ultimateshowCopy[z]=targetarray[the_one]
targetarray[the_one]=_selected!
z++
}
}
}

if (randomorder==yes)
randomize(ultimateshow)
else
ultimateshowCopy=ultimateshow

function rotateimages(){
curcycle=(currentslide==0)? curcycle+1 : curcycle
ultcontainer='<center>'
if (ultimateshowCopy[currentslide][1]!=)
<?php echo ultcontainer+='<a href=\javascript:popup(\'.$_SERVER['PHP_SELF'].?pic='+ultimateshowCopy[currentslide][1]+'\');\ >'\n; ?>
ultcontainer+='<img src='+ultimateshowCopy[currentslide][0]+' border=0 width=155px height=222px>'
if (ultimateshowCopy[currentslide][1]!=)
ultcontainer+='</a>'
ultcontainer+='</center>'
if (ie||dom)
crossrotateobj.innerHTML=ultcontainer
if (currentslide==ultimateshow.length-1) currentslide=0
else currentslide++
if (curcycle==parseInt(slidecycles) && currentslide==0)
return
setTimeout(rotateimages(),slidedelay)
}

if (ie||dom)
document.write('<div id=slidedom style=width:'+slidewidth+';height:'+slideheight+'; background-color:'+slidebgcolor+'></div>')

function start_slider(){
crossrotateobj=dom? document.getElementById(slidedom) : document.all.slidedom
rotateimages()
}

if (ie||dom)
window.onload=start_slider

</script>

<?
}
?>
 
Thema:

Slideshow mit PopUp Funktion

ANGEBOTE & SPONSOREN

Statistik des Forums

Themen
113.840
Beiträge
707.963
Mitglieder
51.494
Neuestes Mitglied
Flensburg45
Oben