SELFHTML

Forum SELFHTML: Archives:
diaporama complet si l'on ajoute des liens sur les images

Page d'information: vue d'ensemble
vers le bas 

(JAVASCRIPT) diaporama complet si l'on ajoute des liens sur les images

Le message suivant est de: guy, Adresse électronique guyo@free.fr, 27. 09. 2002, 19:51

bonjour
dans cet excellent diaporama ci dessous à défilement manuel ou automatique (ce qui est rare à trouver dans les scripts du web)(de http://www.toulouse-renaissance.net/c_outils/) il ne manque que la possibilité d'avoir 1 lien html cliquable sur les images
(lien d'1 page à chaque fois different selon la photo)
quelqu'1 aurait il la solution?
merci d'avance
guy


<!-- DEBUT DU SCRIPT DIAPORAMA-->
<script
LANGUAGE="JavaScript">
var current = 0;

function next(){ // forward one image
if(document.formname.slide[current+1]){
document.images.show.src = document.formname.slide[current+1].value;
document.formname.slide.selectedIndex = ++current;}
else{first();}}

function previous(){ // back on image
if((current-1) >= 0){
document.images.show.src = document.formname.slide[current-1].value;
document.formname.slide.selectedIndex= --current;}
else{last();}}

function first(){ // jump to first image
current=0;
document.images.show.src = document.formname.slide[0].value;
document.formname.slide.selectedIndex=0;}

function last(){ // this is jump to last image
current=(document.formname.slide.length-1);
document.images.show.src = document.formname.slide[current].value;
document.formname.slide.selectedIndex=current;}

function ap(text){ // this controls the auto-play and/or auto-stop
document.formname.slidebutton.value=(text == "Stop") ? "Start" : "Stop";
rotate();}

function change(){ // this is for the pulldown menu
current=document.formname.slide.selectedIndex;
document.images.show.src = document.formname.slide[current].value;}

function rotate() {
if (document.formname.slidebutton.value == "Stop") {
current = (current == document.formname.slide.length-1) ? 0 : current+1;
document.images.show.src = document.formname.slide[current].value;
document.formname.slide.selectedIndex = current;
window.setTimeout("rotate()", 5000);}}
// End --></script> </p>

<form name="formname">
<div align="center"><center><table cellspacing="1" cellpadding="4" bgcolor="#000000">
<tr>
<td align="center" bgcolor="white"><b>DIAPORAMA</b> </td>
</tr>
<tr>
<td align="center" bgcolor="white" width="200" height="150"><img
src="IMAGE_1.jpg" name="show" WIDTH="170" HEIGHT="202"></td>
</tr>
<tr>
<td align="center" bgcolor="#C0C0C0"><select name="slide" onChange="change();" size="1">
<option value="IMAGE_1" selected>VOTRE COMMENTAIRE 1</option>
<option value="IMAGE_2.jpg">VOTRE COMMENTAIRE 2</option>
<option value="IMAGE_3.jpg">VOTRE COMMENTAIRE 3</option>
</select> </td>
</tr>
<tr>
<td align="center" bgcolor="#C0C0C0"><input type="button" onclick="first();"
value="|&lt;&lt;" title="Jump to beginning" style="border:1 SOLID #e6e6e6;"> <input
type="button" onclick="previous();" value="&lt;&lt;" title="Last Picture"
style="border:1 SOLID #e6e6e6;"> <input type="button" name="slidebutton"
onClick="ap(this.value);" value="Start" title="AutoPlay"
style="width:75;border:1 SOLID #e6e6e6;"> <input type="button" onclick="next();"
value="&gt;&gt;" title="Next Picture" style="border:1 SOLID #e6e6e6;"> <input
type="button" onclick="last();" value="&gt;&gt;|" title="Jump to end"
style="border:1 SOLID #e6e6e6;"> </td>
</tr>
</table>
</center></div>
</form>
<!-- FIN DU SCRIPT DIAPORAMA-->


 
vers le hautvers le bas 

(JAVASCRIPT) en attendant j'ai trouvé ceci, faute de mieux...

Le message suivant est de: guy, Adresse électronique guyo@free.fr, 28. 09. 2002, 03:12
http://gecko.kilio.com/C_hommage.htm

 en attendant j'ai trouvé ceci, faute de mieux:
(voir ex sur notre site)

var target = "top"

function envoie(frm){
URL = formname.mgros.options[formname.mgros.selectedIndex].value
if (formname.mgros.selectedIndex != 0){
if (target == "blank") mywindow = window.open(''+URL+'');
else if (target == "self") document.location = URL;
else parent.frames[target].location  = URL;
}else alert('Veuillez faire un choix au zoom.');}

<SELECT NAME="mgros" SIZE=1 onChange="envoie(this.form)">
<OPTION SELECTED>___Zoom sur____
<OPTION VALUE="phil_zoom1.htm">Afrique de Phil</option>
<OPTION VALUE="phil_zoom2.htm">Inca de Phil</option>
</SELECT>


 
vers le haut

© 1998-2004 Adresse électronique selfhtml@fr.selfhtml.org