Manolo59
Membre récent

Hors-Ligne
Messages: 5

Je suis un lama!
|
J'ai réussi à trouver le code suivant (il est deja modifié selon mes besoin) :
dans HEAD :
<script language="javascript" type="text/javascript"> <!-- var win=null; function NewWindow(mypage,myname,w,h,scroll,pos){ if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;} if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;} else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20} settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no'; win=window.open(mypage,myname,settings);} // --> </script>
Dans BODY (je place ce code à chaque vignette-lien en changeant la taille de fenetre en fonction de l'image correspondante) :
<a href="../../gfx/images/cyclisme/cyclocross/cham_picardie_12122004/IMG_1.jpg" onclick="NewWindow(this.href,'image','640','426','no','center');return false" onfocus="this.blur()"><img src="../../gfx/images/cyclisme/cyclocross/cham_picardie_12122004/IMG_1_small.jpg" width="150" height="100" border="0">
c'est ce que j'ai trouvé de plus simple à utiliser et ça fonctionne comme je le souhaitais.
Ca vous parait bien ou pas ? y-a-t-il encore plus simple ?
en tous cas : JE TIENS LE BON BOUT ! merci. |